Note that there are some explanatory texts on larger screens.

plurals
  1. POIIS7: disabling HttpModule in subapplication - sites, application and virtual directories
    primarykey
    data
    text
    <p>I have a few aspx files in a "Cache" folder in my application and I do not want HttpModules to run for those files in that folder. I tried having a web.config in subdirectory but learned that HttpModules take the root web.config and not that of the subdirectory. <a href="http://www.paulvanbrenk.com/blog/2005/06/23/HttpModulesSubDirectoriesAndYou.aspx" rel="noreferrer">Reference 1</a>, <a href="http://bytes.com/topic/asp-net/answers/490087-help-add-remove-clear-httpmodule-subfolder-never-work" rel="noreferrer">Reference2</a>. So I decided to have this directory as a sub application as per suggestion <a href="http://aspadvice.com/blogs/ssmith/archive/2006/08/21/HttpModule-Breaks-SubApplications-Problem-Solved.aspx" rel="noreferrer">here</a> and <a href="http://www.aspdotnetfaq.com/Faq/how-to-disable-web-config-inheritance-for-child-applications-in-subfolders-in-asp-net.aspx" rel="noreferrer">here</a>.</p> <p>So I configure my application,then "add application" , map it to this directory, which already was inside this application and boom, it fails. It works for a static html file, but aspx files are not available.</p> <p>My question is, how do I configure a sub-application in IIS7 so that the sub-application can have its own web.config and there I can disable HTTPModules of the root application</p> <p>Edit:In fact I tried creating a subapplication within my main application and it did not work. Can some one point me to any article on how to configure a sub-application in IIS7 ?</p> <p>Edit2: adding the error image. So how should I configure the child app pool. The child app runs in the same app pool as that of parent</p> <p>Edit3: sorry, the child was running on a different app pool. A generic app worked(without modules). I am marking the answer after I try out the modules.Thanks for your help guys. There is something specific in my parent app web.config, which I am going to hunt down now.</p> <p><a href="http://i49.tinypic.com/ibjhw4.jpg" rel="noreferrer">alt text http://i49.tinypic.com/ibjhw4.jpg</a></p> <p><strong>EDIT: Actually both the answers provided below are correct. If you are using IIS7 integrated mode your modules should be in system.webServer and if IIS7 - classic mode your modules (and handlers?) should be in system.web</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload