Reputation: 61287
I have a Website on IIS 7.5 configured as shown below.
ParentWebSite
---ChildWebApp
When I access the following url it works fine.
http://ParentWebSite/
When I access the childWebApplication using the following Url.
http://ParentWebSite/ChildWebApp
It gives a compilation error showing one namespace (ParentWebSite.BLL) not found. But that namespace is used only in ParentWebSite and not at all referred in the ChildWebApp.
My question why is my ChildWebApp dependent on the ParentWebSite dll?
Is not the ChildWebApp when deployed as above independent of the ParentWebSite when both are using there own App Pool?
Upvotes: 3
Views: 958
Reputation: 10140
Is the child application configured as an application (right-click, Convert to Application
)?
Upvotes: 0
Reputation: 13591
The reason this fails is probably cause at the parentWebSite web.config there might be references to a module or handler or something of that sort that is inside that Namespace. Since configuration is inherited to child applications then your child app is trying to load the same namespace but its probably defined in an assembly inside the /bin directory of parent or /app_code/, but they are not in the children folder.
So look into the parent's web.config and see if you can find that assembly being referenced there.
If I'm right, you can set the inheritInChildApplications="false" to prevent this inheritance behavior.
Upvotes: 2