I'm starting to write some very simple web-apps in C# and occasionally I get exceptions about not having a proxy configured. I am in a work environment that has a rather strict proxy auto-configuration file (.pac -- Proxy Auto-Config).
Is there a way to tell C# to use that .pac file for proxy settings?
.NET can use the default proxy settings of the user running the code. It uses the same settings that are defined for IE. See this article: https://msdn.microsoft.com/en-us/library/dkwyc043%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
You should also see this SO post about MIME types for the PAC file: Using Proxy Automatic Configuration from IE Settings in .Net