Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Images don't show up on remote computers

Images don't show up on remote computers

Scheduled Pinned Locked Moved ASP.NET
helpquestion
12 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stefan R
    wrote on last edited by
    #1

    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.

    I G 2 Replies Last reply
    0
    • S Stefan R

      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.

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      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.

      S 1 Reply Last reply
      0
      • I Ista

        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.

        S Offline
        S Offline
        Stefan R
        wrote on last edited by
        #3

        Still not doing it.. Thanks anyway

        I 1 Reply Last reply
        0
        • S Stefan R

          Still not doing it.. Thanks anyway

          I Offline
          I Offline
          Ista
          wrote on last edited by
          #4

          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.

          S 1 Reply Last reply
          0
          • I Ista

            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.

            S Offline
            S Offline
            Stefan R
            wrote on last edited by
            #5

            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 D 2 Replies Last reply
            0
            • S Stefan R

              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.

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              You can't use physical adresses as the source of the images. --- b { font-weight: normal; }

              1 Reply Last reply
              0
              • S Stefan R

                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 Offline
                I Offline
                Ista
                wrote on last edited by
                #7

                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.

                S 1 Reply Last reply
                0
                • I Ista

                  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.

                  S Offline
                  S Offline
                  Stefan R
                  wrote on last edited by
                  #8

                  I'll go with the subfolder thing, easy enough:) Thanks a lot for the help! *back to coding

                  1 Reply Last reply
                  0
                  • S Stefan R

                    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

                    D Offline
                    D Offline
                    Daniel Santillanes
                    wrote on last edited by
                    #9

                    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

                    S 1 Reply Last reply
                    0
                    • D Daniel Santillanes

                      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

                      S Offline
                      S Offline
                      Stefan R
                      wrote on last edited by
                      #10

                      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

                      G 1 Reply Last reply
                      0
                      • S Stefan R

                        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

                        G Offline
                        G Offline
                        Guffa
                        wrote on last edited by
                        #11

                        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; }

                        D 1 Reply Last reply
                        0
                        • G Guffa

                          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; }

                          D Offline
                          D Offline
                          Daniel Santillanes
                          wrote on last edited by
                          #12

                          It can't be explained better than this :). daniero

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups