views:

403

answers:

2

I've tried wrapping my

<system.web>

with

<location path="." InheritInChildApplications="false">

like this

<location path="." InheritInChildApplications="false">
<system.web>...</system.web>
</location>

But VS 2010 Web Developer Express keeps saying "The 'InheritInChildApplications' attribute is not allowed" and when I run my web app there's an error:

"HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid."

Config Error Unrecognized attribute 'InheritInChildApplications'.

I've seen some smartguys all over the Internet discussing this and how it is working for them but there's much larger number of people here at SO and other places that did not get this to work.

My configuration: ASP.NET 4.0 RTM, VS 2010, IIS 7.5

+2  A: 

Shouldn't it be a lowercase 'i'?

<location path="." inheritInChildApplications="false">

I have been using it successfully on the last 4 or 5 projects I have worked on. My spec is similar to yours. I'm still using .NET 4 RC. I also include the system.webServer settings within location.

Good luck,

Rich

kim3er
Aaarrrgh! LOL! It's capitalized in MSDN manuals, so I used it as such.
mare
Ok, the root website is working now, but the subdirectory (configured as an aplication) still tries to load the contents of my 'namespaces' element.
mare
That sucks. Let me know if it works. It's worth flagging it on MSDN.
kim3er
Have you changed the default application name of the sub app?
kim3er
A: 

It could be because you don't have a namespace specified on the root node? eg

You need

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"&gt;

not

<configuration>
Sprintstar