PC Review


Reply
Thread Tools Rate Thread

Problems with URL Syntax

 
 
Jerry Spence1
Guest
Posts: n/a
 
      25th May 2006
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


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      25th May 2006
"Jerry Spence1" <(E-Mail Removed)> 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/>

 
Reply With Quote
 
 
 
 
Jerry Spence1
Guest
Posts: n/a
 
      25th May 2006

"Herfried K. Wagner [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "Jerry Spence1" <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WHERE syntax v. JOIN ON syntax Siegfried Heintze Microsoft Access Database Table Design 8 17th Dec 2007 02:30 PM
Tools to convert a .reg file syntax to an inf file syntax Jeffrey Millar Microsoft Dot NET 0 12th Sep 2005 08:35 PM
how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes such as "foo/bar" vs "bar\foo" Daniel Microsoft C# .NET 0 31st Aug 2005 01:01 AM
redirect URL's, return URL's, and URL Parameters Jon paugh Microsoft ASP .NET 1 10th Jul 2004 06:29 AM
How to chage Absolute url to relative url ,and relative url to absolute url gqtang Microsoft C# .NET 1 13th Sep 2003 05:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:41 PM.