Problems with URL Syntax

Discussion in 'Microsoft VB .NET' started by Jerry Spence1, May 25, 2006.

  1. I am trying to get a jpg image as follows:

    Dim Client As System.Net.WebClient = New System.Net.WebClient
    Client.DownloadFile("http://root:<password>@192.168.0.99/cgi-bin/video.jpg",
    MyFilename)

    However I understand that IE no longer supports this 'in-line' presentation
    of the username and password strings. Indeed I am getting a "Not Authorized"
    error being returned.

    Although I'm not using IE directly, are the components (and the security
    contraints) of IE still being used in the background?

    Has anyone met this before and is there a work around?

    Thanks

    -Jerry
     
    Jerry Spence1, May 25, 2006
    #1
    1. Advertisements

  2. "Jerry Spence1" <> schrieb:
    >I am trying to get a jpg image as follows:
    >
    > Dim Client As System.Net.WebClient = New System.Net.WebClient
    > Client.DownloadFile("http://root:<password>@192.168.0.99/cgi-bin/video.jpg",
    > MyFilename)
    >
    > However I understand that IE no longer supports this 'in-line'
    > presentation of the username and password strings. Indeed I am getting a
    > "Not Authorized" error being returned.


    It's nowhere specified that username and password can be embedded inside
    HTTP URIs (this does not apply to FTP URIs though), and only some browsers
    supported this sort of URIs. However, embedding username and password into
    URIs is a very bad idea for security reasons. Instead you may want to check
    out the 'WebClient' object's 'Credentials' property which can be used to
    pass authentication data to the server.

    > Although I'm not using IE directly, are the components (and the security
    > contraints) of IE still being used in the background?


    No, 'WebClient' has nothing to do with IE. It was simply IE which provided
    functionality which was not standard compliant and insecure and has been
    abandoned for this reason.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>
     
    Herfried K. Wagner [MVP], May 25, 2006
    #2
    1. Advertisements

  3. "Herfried K. Wagner [MVP]" <> wrote in message
    news:%...
    > "Jerry Spence1" <> schrieb:
    >>I am trying to get a jpg image as follows:
    >>
    >> Dim Client As System.Net.WebClient = New System.Net.WebClient
    >> Client.DownloadFile("http://root:<password>@192.168.0.99/cgi-bin/video.jpg",
    >> MyFilename)
    >>
    >> However I understand that IE no longer supports this 'in-line'
    >> presentation of the username and password strings. Indeed I am getting a
    >> "Not Authorized" error being returned.

    >
    > It's nowhere specified that username and password can be embedded inside
    > HTTP URIs (this does not apply to FTP URIs though), and only some browsers
    > supported this sort of URIs. However, embedding username and password
    > into URIs is a very bad idea for security reasons. Instead you may want
    > to check out the 'WebClient' object's 'Credentials' property which can be
    > used to pass authentication data to the server.
    >
    >> Although I'm not using IE directly, are the components (and the security
    >> contraints) of IE still being used in the background?

    >
    > No, 'WebClient' has nothing to do with IE. It was simply IE which
    > provided functionality which was not standard compliant and insecure and
    > has been abandoned for this reason.
    >
    > --
    > M S Herfried K. Wagner
    > M V P <URL:http://dotnet.mvps.org/>
    > V B <URL:http://classicvb.org/petition/>


    Credentials worked a treat. Thank you so much!

    -Jerry
     
    Jerry Spence1, May 25, 2006
    #3
    1. Advertisements

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. D.J.

    vb.net console apps syntax ?

    D.J., Aug 24, 2003, in forum: Microsoft VB .NET
    Replies:
    4
    Views:
    602
  2. John Williams

    Relative URL in <A> tag being converted to absolute URL

    John Williams, Nov 13, 2003, in forum: Microsoft VB .NET
    Replies:
    5
    Views:
    796
  3. Guest

    "Incorrect syntax near" problems

    Guest, Jan 4, 2006, in forum: Microsoft VB .NET
    Replies:
    3
    Views:
    177
    Guest
    Jan 4, 2006
  4. Randall Arnold

    problems with URL value in webbrowser app

    Randall Arnold, Mar 2, 2006, in forum: Microsoft VB .NET
    Replies:
    2
    Views:
    364
    Randall Arnold
    Mar 2, 2006
  5. Tony K

    More VB/Access/SQL syntax problems

    Tony K, Sep 10, 2007, in forum: Microsoft VB .NET
    Replies:
    10
    Views:
    261
    Tony K
    Sep 12, 2007
Loading...

Share This Page