asp.net - How to check whether Application_BeginRequest is called for static resources like images on real IIS webserver? -
we have asp.net 4.0 website, , use application_beginrequest event in global.asax smart redirects. when debugging solution under local asp.net development server provided visual studio (no iis), application_beginrequest called both apsx pages , static resources css files, jpg/gif images, etc our pages contain.
that's known issue, real iis hosting of our hosting provider (windows 2008/iis 7.0)? how can check whether happens static resources? , how prohibit this?
you can try;
if (request.path.tolowerinvariant().indexof(".aspx") > -1) { // static files }
Comments
Post a Comment