G
Guest
Hello,
We have a C#.NET app which runs as a windows service. Periodically it needs
to post information via the internet to a remote server.
For the posting, we are using HttpWebRequest class.
This service gets deployed to customer machines. In cases where they use a
proxy server, they complained that our service did not respect the proxy
settings they entered via Internet Explorer. In an earlier post to this
newsgroup, someone pointed out that the IE proxy settings are per user, and
that could be my problem. As it turned out, that was half the problem. We
not only had to run the service as the same user which had IE proxy settings,
but we also had to explicitly set the proxy settings of our HttpWebRequest to
those of IE, like this:
webRequest.Proxy = WebProxy.GetDefaultProxy();
That did work and it caused our service to begin using the IE proxy setting.
However, now the problem is authentication. Our web request is hitting the
proxy as an anonymous request, rather than using the integrated NT security
for the user under which it is running.
I can't find any documentation that tells me how to set my authentication to
use the integrated NT security. I did find sample code which shows how to
set the user/passwd of the proxy call to some strings, but that won't work in
cases where the proxy is trying to use integrated NT security.
Can anyone tell me how to achieve this?
thanks
Robb
We have a C#.NET app which runs as a windows service. Periodically it needs
to post information via the internet to a remote server.
For the posting, we are using HttpWebRequest class.
This service gets deployed to customer machines. In cases where they use a
proxy server, they complained that our service did not respect the proxy
settings they entered via Internet Explorer. In an earlier post to this
newsgroup, someone pointed out that the IE proxy settings are per user, and
that could be my problem. As it turned out, that was half the problem. We
not only had to run the service as the same user which had IE proxy settings,
but we also had to explicitly set the proxy settings of our HttpWebRequest to
those of IE, like this:
webRequest.Proxy = WebProxy.GetDefaultProxy();
That did work and it caused our service to begin using the IE proxy setting.
However, now the problem is authentication. Our web request is hitting the
proxy as an anonymous request, rather than using the integrated NT security
for the user under which it is running.
I can't find any documentation that tells me how to set my authentication to
use the integrated NT security. I did find sample code which shows how to
set the user/passwd of the proxy call to some strings, but that won't work in
cases where the proxy is trying to use integrated NT security.
Can anyone tell me how to achieve this?
thanks
Robb