Geeks With Blogs
Create Fun Things - Samer's Developer Blog Development Blog for C#, .NET and Obj-C

So I have recently implemented dynamic themes and master pages for the program I’ve web program I’ve been writing this year. I had noticed something peculiar after publishing the updates to my live server.

When I published it as a precompiled DLL (that did not allow updates), the theming worked just fine. The user would log in, select their theme (currently supports two) and it would render every page fine.

When I published it using X-copy, one page would render as a mash up between the two themes. It was the strangest thing. It would have the footer from one, the header from the other, etc. Literally a mix-up of the two CSS files in each theme.

I finally realized today what was happening. Since these web applications are being run in sub-folders of the root application, they were inheriting the root application’s theme (which so happens to be one of the choices for the application.)

In other words, the application was inheriting the base site theme, and then had the two to choose from. So it was rendering a mash up between the base site / sub folder application.

I remedied the situation by logging into my server, loading up IIS 7 and clicking on the icon “Pages and Controls” for the specific application.

Under “user Interface”, I removed the two entries for the master page file and the theme. And that worked like a charm!

Posted on Tuesday, July 21, 2009 2:37 PM | Back to top

Comments on this post: Beware of nested web.config theming…

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © samerpaul | Powered by: