Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a .NET 3.5 application that makes a standard http WebRequest:

var webRequest = WebRequest.Create(new Uri(";
var webResponse = webRequest.GetResponse();

This application is often deployed within networks that utilize proxies but I never really had issues with this until it was recently deployed at a client that utilizes the "Blue Coat" Proxy/Firewall.

Their proxy is configured as a transparent proxy.

The issue is that 90% of the time, my WebRequests fail with 401 Unauthorized, yet sometimes they work fine (the behavior is the same on 10+ client machines).

Also, on all of them, it works completely fine if Internet Explorer is opened first and they manually browse to one of my URL's (I checked their IE config and no proxy config is entered). Consequently, all WebRequests from my application work seamlessly.

Their network team has no suggestions but does admit to have seen "funky" behavior in the past.

Anyone have any idea what's going on here and what could be done?

share|improve this question

If you have no specific proxy defined, try this by default:

webRequest.Proxy = WebRequest.DefaultWebProxy;
webRequest.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.