Why do you need to include parent DLLs in asp.net child projects?

I have a newly created asp.net MVC 2.0 application that is in a completely separate solution from an existing asp.net web form application.

Since I didn’t want the user to log in again, I deployed the MVC application on the same site as the existing Webforms application - everything works fine.

One thing that I am completely puzzled with, however, is that the Webforms application uses a third-party DLL that has nothing to do with my MVC application, but I cannot use the MVC application without including this DLL in the MVC \ bin directory. Why is this required? Is this not part of this app? It even causes me problems now, so I'm still curious ...

Why is this DLL dependency required in my MVC application?

+3
source share
1 answer

The reason is that your parent application probably installs this in web.config in the module or handler section, and the IIS system in IIS 7+ uses a distributed / hierarchical configuration system that supports web.config files.

In this case, the child web.config application inherits all the settings from the parent web.config. Unfortunately, ASP.NET uses the / bin directory only for each application and it must be included in the root directory, so this means that since you are probably deploying the DLL in the / bin directory of the parent application, the child application does not know about it.

web.config, location inheritInChildApplications, : http://forums.iis.net/t/994377.aspx

+6

Source: https://habr.com/ru/post/1756238/


All Articles