How can I have my stand alone application not inherit from the root web.config, while having other applications inherit?

Hello Experts!

I am having an issue - I am supposed to have this new application run on this website, and use its own separate web.config.
http://www.mainwebsite.com/myNewApplication

So I found out that I can go into the root web.config and use this:




<location inheritInChildApplications="false">
<system.webServer>
....
</system.webServer>
</location>

Works very well! One problem however - I have other applications on this website that are inheriting from the root web.config, and while I have my new application function well, those other applications don't function at all.

How can I have my application work without inheriting from the root web.config, and at the same time have other applications inherit the root web.config?
LVL 1
vituxaAsked:
Who is Participating?
 
Imran Javed ZiaConnect With a Mentor Consultant Software Engineer - .NET ArchitectCommented:
if you have following url which should not inherit from parent then http://www.mainwebsite.com/myNewApplication

<location path="ParentSite/myNewApplication" inheritInChildApplications="false">
       <system.web>
          <httpRuntime maxRequestLength="5378" executionTimeout="300" />
       </system.web>
    </location>

and in if you have to inherit from parent application for other web application then
http://www.mainwebsite.com/OtherApplication

<location path="ParentSite/OtherApplication" inheritInChildApplications="true">
       <system.web>
         ...
       </system.web>
    </location>
0
 
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
Hi,
You can use path attribute to control this behavior so kindly visit the following link for more details:

http://msdn.microsoft.com/en-us/library/ms178692(v=vs.100).aspx

Thanks
0
 
vituxaAuthor Commented:
I looked at the example and I cannot seem to get that to work.

OK, so my setup is supposed to be like this:
http://www.mainwebsite.com/myNewApplication

In the web.config, right after
<configuration>
I put:

<location path="myNewApplication">
       <system.web>
          <httpRuntime maxRequestLength="5378" executionTimeout="300" />
       </system.web>
    </location>

Please show me how to do it right and where exactly to place it.
0
 
vituxaAuthor Commented:
Please someone provide me with a direct example using mainwebsite.com/myNewApplication
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.