views:

143

answers:

2

I have a Website on IIS 7.5 configured as shown below.

ParentWebSite
       ---ChildWebApp
  1. ParentWebSite is an Asp.Net 4.0 Website project.
  2. ChildWebApp is an Asp.Net 4.0 Web Application.

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?

+1  A: 

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.

CarlosAg
A: 

Is the child application configured as an application (right-click, Convert to Application)?

Paperjam
ChildApp is configured as Application.
Amitabh