简体   繁体   中英

mvc3 invokes Application_EndRequest without Application_BeginRequest()

I have a MVC3 App with DevExpress MVC Controls and the default

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

in RegisterRoutes , but the following URLs from DevEx includes:

/DXR.axd?r=1_3,1_4...
/DXR.axd?r=1_42,1_41,14_18,14_2,...

just invoke the Application_EndRequest() without an invoke of Application_BeginRequest() before.

At the moment, this leads to strange workarounds for bind/unbind the nHibernate CurrentSessionContext...Probably there are better ways to exclude these URLs as a string compare in Application_EndRequest() ?

( Ref:

In what situation Application_EndRequest is called but Application_BeginRequest is not called?

I could not find any Exeption and it only concerns the above DevEx URLs )

I'm not sure if this will work for you, but I had some strange behaviours with DevEx for other things and I solved all the hassle by removing this line from the web.config from the httphandlers and leaving it only in system.webServer -> handlers

  <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />

Maybe it will help

Make sure that you are using the special DX Project Template and all required entries are registered.

Check whether or not the issue still persists without the use DX with the standard ASP.NET MVC Project Template.

If this issue related to DX only, I guess it is better to contact their Support Team.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM