Jaikumar T
Jaikumar T

Reputation:

Http Module & Http Handler is not firing when it is under a virtual directory of a ASP.NET website

Problem: There is a website(localhost:85) configure to C:\abc. I have created a seperate website which has HttpModule and HttpHandler in it. This new website should not be in the main application(C:\abc). So I have put a seperate folder like D:\xyz. And configured a virtual directory under port 85.

Using ISAPI filter whenever related to xyz application request comes, i am mapping the url to \xyz\URIRequest.aspx?RequestURL=ActualQuerystring.

Issue is the request is reaching the XYZ application Global.asax Application_start(). But it is not going through the pipeline(running httpmodule and httphandler).

If i configure this XYZ application as a seperate website or creating virtual directory under website with no web.config in it. The application works fine.

Solution tried:

  1. Moved the web.config entry of xyz application to Abc application web.config and copy pasted the xyz application dlls to ABC/bin directory.

Upvotes: 2

Views: 1103

Answers (2)

Marc Gravell
Marc Gravell

Reputation: 1062770

Have you marked the virtual directory as an application? i.e. does it have a cog in IIS? This is the usual problem when a sub-folder doesn't execute as intended.

Upvotes: 1

Colin
Colin

Reputation: 10638

That's the way virtual directories work in IIS when it comes to web.configs, they are "inherited" from the app above the virtual directory, all the way up to the machine.config in the "windows\Microsoft.NET\etc..." folder.

Upvotes: 0

Related Questions