tags:

views:

32

answers:

1

I make a web request from both an application and a service. From the application (user context), the request works fine. However, the service (LocalSystem context) catches this:

System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.

Why can the application get out but the service can't? Do I need to import some proxy credentials into the service?

A: 

Hey,

You need to specify the Proxy: -

' proxy settings 
Dim cr As New System.Net.NetworkCredential("user", "pwd", "MyDomain") 
Dim pr As New System.Net.WebProxy("127.0.1.2", 80) 

pr.Credentials = cr 
s.Proxy = pr

Cheers,

Phil.

Plip