2
I did several tests and I could see that by modifying the HttpContext.Current.User
Application_PostAuthenticateRequest
(Global.asax.Cs) I get an Internal Server Error in the concatenated/minified Bundle request.
Follows code quoted:
protected void Application_PostAuthenticateRequest( Object sender, EventArgs e )
{
HttpContext.Current.User = SessionManager.GetCurrentUser( Request );
if (IsWebApiRequest())
{
HttpContext.Current.SetSessionStateBehavior( SessionStateBehavior.Required );
}
}
private bool IsWebApiRequest()
{
return HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath.StartsWith( WebApiConfig.UrlPrefixRelative );
}
There is only the header of the request with error. What is the real error?
– Leonel Sanches da Silva
The request does not generate an Http Response in the console. It generates an html with an Runtime error. https://gist.github.com/cbfranca/5b32461f6613486e3d11
– cbfranca
A kick: I think for Bundling there is no user associated with the context. Have you tried debugging this event?
– Leonel Sanches da Silva
That’s exactly what @Ciganomorrisonmendez. Obg
– cbfranca