Making nested ASP.NET applications work !

by JoeStagner 4/2/2008 9:40:25 AM

Have you ever tried to set up a web site and use 2 popular ASP.NET applications ?

Did you get THIS ?

I did.

I set up BlogEngine.net in c:\inetpub\wwwroot - it worked fine !

Then I set up ScrewTurnWiki in c:\inetpub\wwwroot\wiki.

Now, ScrewTurnWiki is really simple to install and it's always worked for me before but this install failed (though as you'll see the problem is ASP.MET and the applications.)

The error messages that I was getting when trying to load the wiki were about not being able to resolve a BlogEngine.net assembly !

The problem is this......

ASP.NET applications have a distinct and complete configuration hierarchy. This is very useful if you are taking advantage of it, but can be a real pain if you are not.

The application in the subordinate directory inherits the entries from the root application. So, extensions, handlers, providers, etc.

The solution is a little counterintuitive. You would think that you could tell the subordinate application (Wiki) to ignore any configuration changes that are made higher up in the hierarchy, but you can't.

You need to tell the root application not to send configuration to any subordinate applications.

It looks something like this.

<configuration>
    <configSections>
        ...
    </configSections>
    <location path="." inheritInChildApplications ="false">
        ... rest of config
    </location>
</configuration>

Many thanks to Nikhil and Clint for the data !

Currently rated 5.0 by 8 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

ASP.NET | Joe Stagner [Syndicated]

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About your host.

Name of author Joe Stagner
?????

E-mail me Send mail

Calendar

<<  April 2008  >>
MoTuWeThFrSaSu
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

View posts in large calendar

Pages

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in