As title suggested, how can I achieve that in my webform project? Currently, if a url points towards a file, the server will send the response with that file without ever entering Application_BeginRequest
. Even the MapPageRoute
method does not change this behavior. Is there a simple solution?
You may wish to set this in your web.config
:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
So that even static files are processed by ASP.NET.
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.