1

How does an IIS App Pool determine its Internet Settings?

I'm specifying a custom identity under which to host a .NET web application, a service account that is part of our Active Directory domain.

When the application runs, it needs to make HTTP requests to other servers. This action causes it to read web and proxy settings from some location, but I can't understand where it goes for this information.

Does it look:

  • At the default account's settings on that box?
  • At the default profile on the AD server?
  • Its own local/roaming profile?
  • A combination of the above?
  • Somewhere completely different?
Paul Turner
  • 251
  • 4
  • 17
  • Are you using .NET methods to get HTTP content? They should be getting proxy settings from IE. Windows maintains global internet options in Control Panel. –  Jul 07 '11 at 11:51
  • A .NET application will *normally* read the internet settings from the account's local profile. What happens when, as in this case, the account lacks a local profile, because it is just being used as a security principal? – Paul Turner Jul 07 '11 at 14:18

1 Answers1

1

Thought .Net used WinHTTP, eventually, under the covers. (NETSH WINHTTP SH PROXY)

Generally, though, I'd suggest it's best to be explicit about it in the web.config, via the defaultProxy element: http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx

Avoids all that nasty identity-based stuff.

TristanK
  • 9,073
  • 2
  • 28
  • 39
  • And as a sub-answer to your question: The app pool doesn't look anywhere - the application framework you're using will determine the answers to those questions. Using WinInet is different from WinHTTP, which may be different from HttpWebRequest (but as I mentioned, I'm 89% sure it's actually using WinHTTP natively) – TristanK Jul 08 '11 at 00:29
  • Actually, this is where my question comes in: "If the defaultProxy element is empty, the proxy settings from Internet Explorer will be used." – Paul Turner Jul 08 '11 at 08:36
  • It gets complicated if you are (or are not) loading a user profile. For App Pool Identities with a loaded user profile, I assume NetworkService's settings would be the ones. My point is not to let that mess affect you. – TristanK Jul 09 '11 at 03:17