I have one asp.net mvc 3 application (www.name.com) with custom module added to web.config:
<modules runAllManagedModulesForAllRequests="true">
<add name="MyModule" type="Modules.MyModule" />
</modules>
When I run from this application second application (www.name.com/Another) I get error:
Could not load type ‘Modules.MyModule’. But I don’t need this module in second app, only in first. Any solution?
This is caused by ASP.NET configuration inheritance, as http://www.name.com/Another is a subdirectory of http://www.name.com it will inherit all of the web.config settings of the http://www.name.com aswell.
Try adding:
To http://www.name.com/Another‘s web.config.