Re: 401 error from proxy server
From: Roger Willcocks (RogerW_at_l-space-design.com)
Date: 02/24/04
- Next message: Roger Willcocks: "Re: Help...Replicating IE HTTP protocol to communicate with ASP.NET"
- Previous message: Clayton Gulick: "Feature Request"
- In reply to: Mike: "401 error from proxy server"
- Next in thread: Mike: "Re: 401 error from proxy server"
- Reply: Mike: "Re: 401 error from proxy server"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Feb 2004 06:57:45 +1300
Looks 'OK' but you might try using Basic Auth instead of network
credentials
Also didn't see a domain in the code.
"Mike" <programmer@4rph.com> wrote in message
news:udrxoIv%23DHA.1796@TK2MSFTNGP12.phx.gbl...
> Using the .NET Compact Framework on a Pocket PC 2003, I am attempting to
> access a web page on the internet through a proxy server. I'm setting the
> proxy server name, port, username, and password in my VB .NET code:
>
> myRequest = System.Net.WebRequest.Create(RsURL)
>
> myRequest.Timeout = 30000
>
> myProxy = New System.Net.WebProxy
>
> myUri = New Uri(Utils.GetOption(cmd, "ProxyServer"))
>
> ' Associate the new Uri object to the myProxy object.
>
> myProxy.Address = myUri
>
> sProxyUser = Utils.GetOption(cmd, "ProxyUser")
>
> myProxy.Credentials = New System.Net.NetworkCredential(sProxyUser,
> Utils.GetOption(cmd, "ProxyPwd"))
>
> myRequest.Proxy = myProxy
>
> myResponse = myRequest.GetResponse()
>
> An exception is raised with the Message = "The remote server returned an
> error: (401) Unauthorized" on the GetResponse() call. The request doesn't
> appear to be making it to
> the final destination - the request doesn't show up in our web log. So
the
> response must be coming from the proxy server. It's supposed to be a
> "Raptor Firewall". Pocket Internet Explorer is able to access web pages
> through it.
>
> What's the best way to fix this problem?
>
> (I'm posting to this newsgroup because it's the closest one that is
> monitored by the MSDN Managed Newsgroups feature)
>
>
>
>
- Next message: Roger Willcocks: "Re: Help...Replicating IE HTTP protocol to communicate with ASP.NET"
- Previous message: Clayton Gulick: "Feature Request"
- In reply to: Mike: "401 error from proxy server"
- Next in thread: Mike: "Re: 401 error from proxy server"
- Reply: Mike: "Re: 401 error from proxy server"
- Messages sorted by: [ date ] [ thread ]