I have a newly created asp.net MVC 2.0 application that is in a completely separate solution from an existing asp.net webforms application.
Because I didn't want the user to have to log in again, I deployed the MVC application in the same site as the existing Webforms app - everything works great.
One thing has me completely perplexed though, the Webforms application uses a Third Party DLL that has nothing to do with my MVC application, yet I can't use the MVC application without including that DLL in the MVC \bin directory. Why is this required? It's not part of that application? It's even causing me issues now so I'm even more curious...
Why is this dependency to the DLL being required in my MVC application?
The reason is because your parent application probably sets that in web.config in the modules or handlers section, and the IIS configuration system in IIS 7+ uses a distributed/hierarchical config system supporting web.config files.
In this case the child application web.config inherits all the settings from the parent web.config. Unfortunately ASP.NET uses the /bin directory only per-application and it has to be included in the root directory, so that means that since you probably are deploying the DLL in the /bin directory of the parent app, the child app does not know anything about it.
You could modify the parent's web.config to use a location tag and set the inheritInChildApplications so that you stop it from inheriting into the child app: http://forums.iis.net/t/994377.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With