Image not displaying

Discussion in 'ASP .Net' started by =?Utf-8?B?cG11ZA==?=, Feb 15, 2005.

  1. Hi,

    I have an image which resides on a different server...on data server. I am
    developing on Development server. When I use the image URLin my ASP.Net web
    page as xxx.xxx.x.xx\\SHARE\GRAPHICS\image.jpg , that image shows up in the
    development server but when I use my local machine for vewing that image , it
    doesnt show up...Why is that?
    --
    pmud
    =?Utf-8?B?cG11ZA==?=, Feb 15, 2005
    #1
    1. Advertising

  2. Because a URL is not UNC. You need to either create a virtual directory
    that points to that location, or us File IO to get the image.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    "pmud" <> wrote in message
    news:...
    > Hi,
    >
    > I have an image which resides on a different server...on data server. I am
    > developing on Development server. When I use the image URLin my ASP.Net
    > web
    > page as xxx.xxx.x.xx\\SHARE\GRAPHICS\image.jpg , that image shows up in
    > the
    > development server but when I use my local machine for vewing that image ,
    > it
    > doesnt show up...Why is that?
    > --
    > pmud
    Kevin Spencer, Feb 15, 2005
    #2
    1. Advertising

  3. Hi Kevin,

    How to go create a virtual directory which points to the location of the
    image and how to create a file IO to get that image? It might be a very basic
    question, but I would be glad if you could help.

    Thanks


    "pmud" wrote:

    > Hi,
    >
    > I have an image which resides on a different server...on data server. I am
    > developing on Development server. When I use the image URLin my ASP.Net web
    > page as xxx.xxx.x.xx\\SHARE\GRAPHICS\image.jpg , that image shows up in the
    > development server but when I use my local machine for vewing that image , it
    > doesnt show up...Why is that?
    > --
    > pmud
    =?Utf-8?B?cG11ZA==?=, Feb 15, 2005
    #3
  4. Hi pmud,

    Well, you want to do one OR the other, NOT both. The first option would be
    done through Internet Information Services Admin. It might be best to ask a
    network administrator to do that for you. A virtual directory is simply a
    web directory that points to a real directory somewhere, not necessarily in
    the web server's folders.

    The second option is fairly self-explanatory. You use System.IO classes to
    open the file, and write it to the Response.OutputStream. Your app will have
    to have permission to open the file.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    "pmud" <> wrote in message
    news:...
    > Hi Kevin,
    >
    > How to go create a virtual directory which points to the location of the
    > image and how to create a file IO to get that image? It might be a very
    > basic
    > question, but I would be glad if you could help.
    >
    > Thanks
    >
    >
    > "pmud" wrote:
    >
    >> Hi,
    >>
    >> I have an image which resides on a different server...on data server. I
    >> am
    >> developing on Development server. When I use the image URLin my ASP.Net
    >> web
    >> page as xxx.xxx.x.xx\\SHARE\GRAPHICS\image.jpg , that image shows up in
    >> the
    >> development server but when I use my local machine for vewing that image
    >> , it
    >> doesnt show up...Why is that?
    >> --
    >> pmud
    Kevin Spencer, Feb 15, 2005
    #4
  5. Hi Kevin,

    In IIS I browsed to Default Websites , then in my website folder called APP,
    I right clicked & created a new Virtual Directory which points to
    C:/Inetpub/wwwroot/APP . Inside APP i created an image folder which contains
    the image. But when i see it from my local machine, with the URL for the site
    as :
    http//xxx.xx.x.x/APP/Default.aspx , i still cant see the image, or when I
    use the name of the Virual directory in the path, as
    http//xxx.xx.x.x/VirtualDir/APP/Default.aspx , i still cant see the image
    displayed.

    Did I do it the right way? If yes, then why is it not displaying?
    "Kevin Spencer" wrote:

    > Hi pmud,
    >
    > Well, you want to do one OR the other, NOT both. The first option would be
    > done through Internet Information Services Admin. It might be best to ask a
    > network administrator to do that for you. A virtual directory is simply a
    > web directory that points to a real directory somewhere, not necessarily in
    > the web server's folders.
    >
    > The second option is fairly self-explanatory. You use System.IO classes to
    > open the file, and write it to the Response.OutputStream. Your app will have
    > to have permission to open the file.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > ..Net Developer
    > Neither a follower nor a lender be.
    >
    > "pmud" <> wrote in message
    > news:...
    > > Hi Kevin,
    > >
    > > How to go create a virtual directory which points to the location of the
    > > image and how to create a file IO to get that image? It might be a very
    > > basic
    > > question, but I would be glad if you could help.
    > >
    > > Thanks
    > >
    > >
    > > "pmud" wrote:
    > >
    > >> Hi,
    > >>
    > >> I have an image which resides on a different server...on data server. I
    > >> am
    > >> developing on Development server. When I use the image URLin my ASP.Net
    > >> web
    > >> page as xxx.xxx.x.xx\\SHARE\GRAPHICS\image.jpg , that image shows up in
    > >> the
    > >> development server but when I use my local machine for vewing that image
    > >> , it
    > >> doesnt show up...Why is that?
    > >> --
    > >> pmud

    >
    >
    >
    =?Utf-8?B?cG11ZA==?=, Feb 15, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. http://www.visual-basic-data-mining.net/forum

    Displaying image after selecting an image file.

    http://www.visual-basic-data-mining.net/forum, Sep 15, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    341
    http://www.visual-basic-data-mining.net/forum
    Sep 15, 2004
  2. Mark  Trueman
    Replies:
    6
    Views:
    533
    John Salerno
    Oct 10, 2006
  3. Replies:
    5
    Views:
    379
  4. Norman
    Replies:
    8
    Views:
    525
    Neredbojias
    Oct 13, 2007
  5. Javier
    Replies:
    1
    Views:
    97
    vMike
    Feb 27, 2004
Loading...

Share This Page