I’ve created HttpModule in ASP.NET, and configured it successfully.
My problem is, the module is called only when I give the URL extension (i.e. aspx), if i dont put any extension, the module won’t be called.
How can I solve this?
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The problem is that the request is not being handled by ASP.Net – IIS 6 and below only invokes ASP.Net when it encounters a filename that it associates with ASP.Net, such as an .aspx or .axd file extension.
This is similar to the problem faced when attempting to deploy MVC applications to IIS 6 or below (IIS fails to route the requests to ASP.Net), and the solutons are also similar – you can either individually map every extension you wish to see handled to
aspnet_isapi.dllthe ASP.Net handler (which still won’t work for URLs that don’t have extensions), or you need to use a wildcard mapping to tell IIS to direct all requests to ASP.Net – note that this will include images and other static files which might get handled less efficiently than normal.The article Deploying ASP.NET MVC to IIS 6 discusses the solutions for deploying MVC applications to IIS 6 – this discusses potential solutions with greater detail than I have space for here.