Images don't show up on remote computers
-
Hello, again. When I surf to my webpage hosted on my own computer, images work as expected. However when my friends surf from their computer to my page they get a broken image link. I figured this was an asp web-control issue but buttons/textboxes etc show up properly. I have tried moving my images to wwwroot/images/ but to no avail. Images are still missing on remote computers. What's up with this? you can check it out for yourselves at http://gnocchi.mine.nu/WebApplication1/WebForm1.aspx[^] Don't mind the desing (if it's visible ;P) the page is *very* experimental.
-
Hello, again. When I surf to my webpage hosted on my own computer, images work as expected. However when my friends surf from their computer to my page they get a broken image link. I figured this was an asp web-control issue but buttons/textboxes etc show up properly. I have tried moving my images to wwwroot/images/ but to no avail. Images are still missing on remote computers. What's up with this? you can check it out for yourselves at http://gnocchi.mine.nu/WebApplication1/WebForm1.aspx[^] Don't mind the desing (if it's visible ;P) the page is *very* experimental.
-
give the images relative path names your giving absolutes. I had this issue once I'm not an expert yet, but I play one at work. Yeah and here too.
-
seriously. Use the ide to pick the relative path. You probably have your name as localhost or whatever it is on your system. if you use "../" this will find the right path to your file Or write to a trace log. Nick I'm not an expert yet, but I play one at work. Yeah and here too.
-
seriously. Use the ide to pick the relative path. You probably have your name as localhost or whatever it is on your system. if you use "../" this will find the right path to your file Or write to a trace log. Nick I'm not an expert yet, but I play one at work. Yeah and here too.
These are the paths i'm working with: the webpage -> C:\Inetpub\wwwroot\WebApplication1 the image -> C:\Inetpub\wwwroot\images\ I used the Visual Studio to create the a relatve path to "C:\Inetpub\wwwroot\images\img.jpg" and it didn't work, this did however: "..\images\img.jpg". I would like to display images that are in for example "c:\documents\images\" but have no idea how to make a relative path from my webserver dir to that dir. Is this possible? Or do images be have to be stored in the web-servers subdirectories in order to work? Thanks a lot for taking time to help me! -- modified at 10:43 Friday 9th December, 2005
-
Hello, again. When I surf to my webpage hosted on my own computer, images work as expected. However when my friends surf from their computer to my page they get a broken image link. I figured this was an asp web-control issue but buttons/textboxes etc show up properly. I have tried moving my images to wwwroot/images/ but to no avail. Images are still missing on remote computers. What's up with this? you can check it out for yourselves at http://gnocchi.mine.nu/WebApplication1/WebForm1.aspx[^] Don't mind the desing (if it's visible ;P) the page is *very* experimental.
-
These are the paths i'm working with: the webpage -> C:\Inetpub\wwwroot\WebApplication1 the image -> C:\Inetpub\wwwroot\images\ I used the Visual Studio to create the a relatve path to "C:\Inetpub\wwwroot\images\img.jpg" and it didn't work, this did however: "..\images\img.jpg". I would like to display images that are in for example "c:\documents\images\" but have no idea how to make a relative path from my webserver dir to that dir. Is this possible? Or do images be have to be stored in the web-servers subdirectories in order to work? Thanks a lot for taking time to help me! -- modified at 10:43 Friday 9th December, 2005
-
I usually have them as a sub folder inside root of the web app. but you could use IIS console and map a virtual path to the folder containing your images and reference that in your html I'm not an expert yet, but I play one at work. Yeah and here too.
-
These are the paths i'm working with: the webpage -> C:\Inetpub\wwwroot\WebApplication1 the image -> C:\Inetpub\wwwroot\images\ I used the Visual Studio to create the a relatve path to "C:\Inetpub\wwwroot\images\img.jpg" and it didn't work, this did however: "..\images\img.jpg". I would like to display images that are in for example "c:\documents\images\" but have no idea how to make a relative path from my webserver dir to that dir. Is this possible? Or do images be have to be stored in the web-servers subdirectories in order to work? Thanks a lot for taking time to help me! -- modified at 10:43 Friday 9th December, 2005
You mean you were using the absolute path as of "C:\Inetpub\wwwroot\images\img.jpg" in the IMG's src attribute? :P that won't work hehe, as stated below, you should use a relative path from the page, or a root relative path. daniero
-
You mean you were using the absolute path as of "C:\Inetpub\wwwroot\images\img.jpg" in the IMG's src attribute? :P that won't work hehe, as stated below, you should use a relative path from the page, or a root relative path. daniero
-
The root relative path being the path from the absolute root (like c: ) or the webserver root? Is switching "\" to "/" going to help? -- modified at 11:04 Friday 9th December, 2005
The root of the web application. Anyone browsing to the page (other than you) can't access your hard drive, so it's of course not that root directory. There is no such thing as a webserver root, unless you mean the root folder of the default web site, but it's not that, unless of course the application happens to be the default web site. An url always uses /, never \. --- b { font-weight: normal; }
-
The root of the web application. Anyone browsing to the page (other than you) can't access your hard drive, so it's of course not that root directory. There is no such thing as a webserver root, unless you mean the root folder of the default web site, but it's not that, unless of course the application happens to be the default web site. An url always uses /, never \. --- b { font-weight: normal; }
It can't be explained better than this :). daniero