This project is read-only.

web.config issues with blog in sub folder

Topics: ASP.NET 2.0, Themes
Sep 3, 2010 at 5:21 AM

I've got verson 1.6 running inside its own sub folder like .  The sub folder is running as it's own applicaion on IIS 6.0. on a .NET Hosting provider.  However it won't load because of the following error:

"Parser Error Message: Theme 'myTheme cannot be found in the application or the global theme directories." Source File: E:\Web\myDomain\htdocs\web.config line44.

So the Source file is pointing to the web.config in the ROOT domain, not the /blog web.config.   In the root domain I have an App_Themes folder that contains 'myTheme'.  I noticed in the /blog sub folder that it contains not an App_Theme folder but a 'themes' folder. 

Anyway, I'm not sure what's going on here or how to fix this.  If anyone has some insight, I'd appreciate it greatly. Thank you!


Sep 3, 2010 at 12:28 PM

It sounds like in your parent application (in the root), you have a web.config file for that parent application.

In that web.config file (in the root), on line 44, it's setting the ASP.NET theme to "myTheme".  Do you see this on line 44?

BE.NET has its own theme system.  ASP.NET also has its own theme system that uses the App_Themes folder.  You don't need an App_Themes folder in the /blog sub-folder.

Are you getting this error when accessing the parent application, or when accessing the /blog application?

If you're getting this error while trying to access the /blog folder, this could be because the settings (theme and possibly other settings too) in the parent application are propagating down to the child applications (/blog).  What you can try doing is in the parent application web.config file, wrap the existing <system.web> section in the following <location> tag.

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

Again, these <location> tags above should be put into the PARENT web.config file (not the BE web.config file).

Along the same lines, if you have a <system.webServer> section in the parent web.config file, I would try wrapping the <system.webServer> section in the same <location> tag as shown above.

Sep 4, 2010 at 5:54 PM
Edited Sep 4, 2010 at 8:10 PM


Thanks for your suggestion. It worked perfectly and I'm up and running.  It's good advice for anyone who's hosting the blog in a sub folder, and the parent app has a highly configured and/or complicated web.config file.