there's an internal ASP.Internet web application on the organization network that's using Home windows authentication. Fine. 2-three years ago it had been made the decision that we must open this application for the owner (another large company internationally) therefore we made the modification around the firewall and also, since they don't have active directory accounts here, I prepared a little routine that employs the WindowsAuthentication_OnAuthenticate event handler in global.asax.

So essentially when the traffic originates from the firewall's Ip, that connection is authenticated in global.asax having a technical account we've for this function. To date, so great, everything was working acceptable for years. Really, fine. Allow me to point out that there's an Apache proxy around the firewall, between your user and also the server.

Lately we made the decision to awaken things a little with Ajax and AjaxControlToolkit. Now

  • things are working fine on our network, while
  • our co-workers abroad cannot access the applying whatsoever.

It's horror what just adding AjaxControlToolkit for your project can perform! The proxy error message is quite laconic, here you decide to go:

502 Proxy Error
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

Reason: Error reading from remote server

Or, should you just put an answer.get rid of within the Application_Error part to pressure the mistake particulars with the hole, it states:

Server Error in '/' Application.
Attempted to perform an unauthorized operation.
blah blah blah
An unhandled exception was generated during the execution of the current web request.
blah blah blah
Stack Trace: 

[UnauthorizedAccessException: Attempted to perform an unauthorized operation.]
   System.Security.Principal.WindowsIdentity.get_AuthenticationType() +2176969
   System.Web.HttpRequest.CalcDynamicServerVariable(DynamicServerVariable var) +8728827
   System.Web.HttpServerVarsCollectionEntry.GetValue(HttpRequest request) +33
   System.Web.HttpServerVarsCollection.GetServerVar(Object e) +47
   System.Web.HttpServerVarsCollection.Get(Int32 index) +33
   System.Web.HttpServerVarsCollection.GetValues(Int32 index) +9
   System.Collections.Specialized.NameValueCollection.Add(NameValueCollection c) +75
   System.Web.HttpRequest.FillInParamsCollection() +90
   System.Web.HttpRequest.GetParams() +74
   System.Web.HttpRequest.get_Params() +30
   **AjaxControlToolkit.ToolkitScriptManager.OutputCombinedScriptFile**(HttpContext context) +53
   AjaxControlToolkit.ToolkitScriptManager.OnInit(EventArgs e) +45
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378

I don't remember now exactly but in a certain point when having fun with moving that response.flush() within the code around, I'd more particulars recommending the AjaxControlToolkit attempts to write something inside a folder known as "C:UsersStephen ... blah blah " - which doesn't even exist. All of the Stephens listed here are known as Istvan actually.

The oddest factor within the story that ACT works absolutely fine as lengthy as you are focusing on our local network with "real" home windows customers and authentication. The issue only happens whenever a user comes with the proxy and also you only "pretend" that they're customers here if you attempt to sign in them in global.asax. That also labored before ACD with no hassle. And why a code running on the server attempts to access some

So my questions could be:

  • Who's Stphen? (Just kidding.)
  • Perhaps you have had similar experience? If so, how have you solve it?
  • Do you want anymore particulars?
  • The way you should debug in cases like this whenever you personally not have the treatments for the proxy and also the firewall?