Results 1 to 7 of 7

Thread: I can't see my graphics - why?

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    59

    Question I can't see my graphics - why?

    Hi all
    I have asked this before (it’s been a while though) but unfortunately I have misplaced the reply.

    I have created a simple multi-page web application on my machine. I have configured IIS for a virtual directory and all’s well. I want others to view and comment on my work so I ask them to tap in http://MyMachineName/MyAppName/ and that should be it. Well, it works but I can’t display the any graphics (and background). If my machine is hosting the web app, then it should be able to display my graphics. It can display on my machine but no one else's.

    What am I doing wrong? How can I correct it?

    Any ideas?

    Thanks for your time

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    your image links are probably pointing to local files. you need to upload them to your site and change the links to point to those.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    59
    Is this true even if you host on an intranet?

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    doesnt matter. This is not an asp .net issue or any kind of web form control problem. This is basic html/http

    if your image link points to file://c:\myimage.jpg no one but on your computer will see that image. That is a local file link.

    the image needs to be on your web server and the image link needs to point to it using the http protocol. http://mysite/myimage.jpg
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    A little better explanation.
    you might have the wrong idea of how viewing web pagd works. When your web browser requests an .aspx pagw(or any other page for that matter) it sends only the final html code. Nothing more. It does NOT send any kind of binary snap shot or a package with all your images in it. The web browser when it receives the html begins to create what the page will look like. when it gets to image links, it looks at the address for the image, then requests that image from whatever location it says. file:// will look on the users local drive, and http:// will look on the web server location.

    So in summary, make sure your image links are pointing to web paths, not local directories because a client will not see it unless the have those images in the EXACT same directory as you do.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  6. #6

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    59
    Understood... It's all clear to me now

  7. #7
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    cool
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width