简体   繁体   中英

Intercept requests into a sub directory/virtual directory of main application

I have a web application in a virtual directory (mainApplication) running under appPool1. In mainApplication there is aa directory called SubApplications and within the SubApplications directory, I have another virtual directory (subApp1) running under appPool2. I have it setup this way because I want to completely isolate the mainApplication from subApp1 . Is it possible to have a HttpHandler or HttpModule running in mainApplication to intercept requests going into subApp1 and then let the page request continue? I would like to do this so that I can make sure that the user is authenticated/authorized in mainApplication and also tack on some information in the url.

For example a page request url might look like: http:///mainapplication/SubApplications/subApp1/default.aspx

Thanks

I don't think that's possible.

HttpModules and HttpHandlers are called on a per-AppPool basis. They don't run in multiple AppPools at once, nor do they allow control to start in one AppPool and continue in another. This is also in keeping with your stated goal of complete isolation.

Keep in mind that an AppPool is basically an entirely separate process, so there's no easy control flow from one to the other.

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