Broken Link

Discussion in 'ASP .Net' started by Mel, Jun 11, 2008.

  1. Mel

    Mel Guest

    My link does not work. I want to create a link to a file that exists
    on a different server. The path to the file is this "\\Junebug\Groups
    \90000003.pdf". My web server is "10.10.1.111". How do I get this
    link to work?

    When I hover over the link the path looks like this:
    http://10.10.1.111/\\Juno\Groups\90000003.pdf
    Mel, Jun 11, 2008
    #1
    1. Advertising

  2. For this you would need to use the FILE:/// moniker, not "Http://
    --Peter
    "Mel" <> wrote in message
    news:...
    > My link does not work. I want to create a link to a file that exists
    > on a different server. The path to the file is this "\\Junebug\Groups
    > \90000003.pdf". My web server is "10.10.1.111". How do I get this
    > link to work?
    >
    > When I hover over the link the path looks like this:
    > http://10.10.1.111/\\Juno\Groups\90000003.pdf
    Peter Bromberg [C# MVP], Jun 12, 2008
    #2
    1. Advertising

  3. Mel

    Mel Guest

    On Jun 11, 7:31 pm, "Peter Bromberg [C# MVP]"
    <> wrote:
    > For this you would need to use the FILE:/// moniker, not "Http://
    > --Peter"Mel" <> wrote in message
    >
    > news:...
    >
    > > My link does not work. I want to create a link to a file that exists
    > > on a different server. The path to the file is this "\\Junebug\Groups
    > > \90000003.pdf". My web server is "10.10.1.111". How do I get this
    > > link to work?

    >
    > > When I hover over the link the path looks like this:
    > >http://10.10.1.111/\\Juno\Groups\90000003.pdf


    Okay thanks. I had the IT guy create a virtual directory on the
    server. Your idea is better though, I'll check it out.
    Mel, Jun 12, 2008
    #3
  4. Mel

    Mel Guest

    On Jun 11, 7:31 pm, "Peter Bromberg [C# MVP]"
    <> wrote:
    > For this you would need to use the FILE:/// moniker, not "Http://
    > --Peter"Mel" <> wrote in message
    >
    > news:...
    >
    > > My link does not work. I want to create a link to a file that exists
    > > on a different server. The path to the file is this "\\Junebug\Groups
    > > \90000003.pdf". My web server is "10.10.1.111". How do I get this
    > > link to work?

    >
    > > When I hover over the link the path looks like this:
    > >http://10.10.1.111/\\Juno\Groups\90000003.pdf


    Okay so I created my virtual directory. Why doesn't DirectoryInfo
    work (see code below)? The "Quote-Docs" is my new virtual directory
    on my web server. I get an error that it could not find part of the
    path and it is trying to query the C:\ drive.

    If e.CommandName = "Quote #" Then
    Dim currentCommand As String = e.CommandName
    Dim currentRowIndex As Integer =
    Int32.Parse(e.CommandArgument)
    Dim strQuoteNum As String =
    gvQuotes.DataKeys(currentRowIndex).Value

    Dim myDir As DirectoryInfo = New DirectoryInfo("~\Quote-
    Docs\" & strQuoteNum)
    dgQuote.DataSource = myDir.GetFiles("*.pdf")
    dgQuote.DataBind()
    End If
    Mel, Jun 12, 2008
    #4
  5. Mel

    Mel Guest

    On Jun 12, 3:52 pm, Mel <> wrote:
    > On Jun 11, 7:31 pm, "Peter Bromberg [C# MVP]"
    >
    > <> wrote:
    > > For this you would need to use the FILE:/// moniker, not "Http://
    > > --Peter"Mel" <> wrote in message

    >
    > >news:...

    >
    > > > My link does not work. I want to create a link to a file that exists
    > > > on a different server. The path to the file is this "\\Junebug\Groups
    > > > \90000003.pdf". My web server is "10.10.1.111". How do I get this
    > > > link to work?

    >
    > > > When I hover over the link the path looks like this:
    > > >http://10.10.1.111/\\Juno\Groups\90000003.pdf

    >
    > Okay so I created my virtual directory. Why doesn't DirectoryInfo
    > work (see code below)? The "Quote-Docs" is my new virtual directory
    > on my web server. I get an error that it could not find part of the
    > path and it is trying to query the C:\ drive.
    >
    > If e.CommandName = "Quote #" Then
    > Dim currentCommand As String = e.CommandName
    > Dim currentRowIndex As Integer =
    > Int32.Parse(e.CommandArgument)
    > Dim strQuoteNum As String =
    > gvQuotes.DataKeys(currentRowIndex).Value
    >
    > Dim myDir As DirectoryInfo = New DirectoryInfo("~\Quote-
    > Docs\" & strQuoteNum)
    > dgQuote.DataSource = myDir.GetFiles("*.pdf")
    > dgQuote.DataBind()
    > End If


    I got it. I just wrapped the path with Server.MapPath.
    Mel, Jun 13, 2008
    #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. Guest
    Replies:
    1
    Views:
    411
    Michael Pearson
    Oct 30, 2003
  2. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    817
    Kevin Spencer
    May 17, 2005
  3. Steven D'Aprano

    Why are "broken iterators" broken?

    Steven D'Aprano, Sep 21, 2008, in forum: Python
    Replies:
    8
    Views:
    648
  4. Cameron Simpson

    Re: Why are "broken iterators" broken?

    Cameron Simpson, Sep 22, 2008, in forum: Python
    Replies:
    0
    Views:
    584
    Cameron Simpson
    Sep 22, 2008
  5. Fredrik Lundh

    Re: Why are "broken iterators" broken?

    Fredrik Lundh, Sep 22, 2008, in forum: Python
    Replies:
    0
    Views:
    603
    Fredrik Lundh
    Sep 22, 2008
Loading...

Share This Page