'Proxy Authentication Required' exception

P

Pankaj S.

Hi All,

I'm facing proxy authentication problem on pocket pc 2003. Following code
work fine on desktop, but it throws "proxy Authentication Required"
exception on "Pocket PC 2003". I read one thread on google
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=#Iwod2iTEHA.387
2%40TK2MSFTNGP10.phx.gbl&rnum=7&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%
26q%3DProxy%2BAuthentication%2BRequired%2B%2522pocket%2BPC%2522

where Nathan (Microsoft guy) said that there is some bug in .NET CF and it's
already fix. I would like to know, does this exception is also related to
the bug? If someone has idea/solution to this problem please let me know.

HttpWebRequest Request;
Request = (HttpWebRequest)HttpWebRequest.Create(new
Uri("http://www.google.com"));
Request.Proxy.Credentials = new NetworkCredential("user1", "pwd1",
"myDomain");

// --------- Code Start -----------------
HttpWebResponse Response;

try {
Response = Request.GetResponse() as HttpWebResponse ;
MessageBox.Show("It's working");
}
catch(Exception e) {
MessageBox.Show(e.ToString());
}
// --------- Code End -----------------


FYI, my proxy server is configured for DIGEST as well as BASIC. If some
client failed to use the DIGEST authentication then it uses BASIC
authentication.

Thanks,
Pankaj
 
G

Guest

Normally proxy server verifies its request based on the sender identification. If it can't identify the sender it will not process the request. So proxy authentication will fail.
Sender IP address does first label of identification.
So you need to register you PPC device IP address in the proxy server. If you don't know the IP address you have to by pass it in the proxy.
 
M

Mike

See the thread in this group with Subject = "NetworkCredentials &
Authentication Modules for WebProxy consumption".

There is a bug in .NET CF that requires you to put the Proxy Credentials on
the HttpRequest object itself for some proxy servers instead of on the Proxy
object. I put the credentials on both objects for maximum chances of
working.
 
P

Pankaj S.

Hi Mike,

Thanks for the reply. I tried that too but it doesn't help. Anyway I have to
supply client proxy credentials when I will connect to other site.

Thanks,
Pankaj
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top