global-asax
How to catch HttpRequestValidationException in production
I have this piece of code to handle the HttpRequestValidationException in my global.asax.cs file. protected void Application_Error(object sender, EventArgs e)[详细]
2023-02-10 20:32 分类:问答Problem with httpContext.RewritePath on IIS 7
I am using HttpContext.RewritePath in Global.asax for some URL rewriting, and it works very well in my development environment on the Cassini server. But when I copy it to the production server runnin[详细]
2023-02-09 22:06 分类:问答BeginRequest-like filter in MVC 3?
I have some code in my application that I need to execute on every request, before anything else executes (even before authentication). So far I\'ve been using the Application_BeginRequest event开发者[详细]
2023-02-08 09:05 分类:问答Code Analysis recommends using const in definition but how in global.asax?
Code public class Global : System.Web.HttpApplication { public开发者_开发百科 const string globalServernameSHA = string.Empty;[详细]
2023-02-08 03:26 分类:问答ASP.Net Session_Start always firing
I am a bit confused about the following: I set up an asp.net Website with some logic in the Session_Start() of the Global.asx. I expected that this even will only trigger once during a session. Howeve[详细]
2023-02-08 02:22 分类:问答what happens with session_start in global.asax if session timeouts?
I have multidomain web application which treats users differently based on URL they use. I am using Session[\"data\"] to keep information about user and starting this session with Session_Start[\"dat[详细]
2023-02-07 15:33 分类:问答Registering routes on session start not application start
I am trying to register the route collection in .net based on each session.The code I have works fine, you goto website/username and it loads the correct sub pages, but you have to restart the applica[详细]
2023-02-07 10:23 分类:问答Redirecting external URLs to an exit page
What would be the best way to redirect users who request an external URL, to a sort of good-bye page?[详细]
2023-02-07 07:52 分类:问答-
Global.asax breaks with AJAX Control Toolkit
Everything was working fine. Then I added the Global.asax and suddenly got this error: Line: 4723 Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server co[详细]
2023-02-06 10:18 分类:问答 How to inject dependencies per http request (or per http context) with unity 2.0 and asp.net mvc
I\'ve read a lot of info on this, but I can\'t find anything current (as of 1/2011) as to how exactly this should be done nowadays. I\'ve read a couple of good posts that seem to have the answer, with[详细]
2023-02-05 01:42 分类:问答