Forum Moderators: open

Message Too Old, No Replies

Problem Setting Theme for Master and content Pages?

         

asifakhtar

11:17 pm on May 11, 2009 (gmt 0)

10+ Year Member



Hello,

I am making a web site with master page in C#. I am using membership, Roles and Profile. I have a theme named Green. In my web.config I did
<pages theme=" Green" />My default page is Login.aspx. When I run the application the theme is not being applied to the Login.aspx but when I log in it is being applied to all other pages.
I want the theme to be applied to all other pages including Login.aspx when I run the application.

Can someone please help me out?

Ocean10000

11:07 pm on May 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Depending on what webserver you are running (iis 7 or the mini web server used for development), the files used in the theme might be restricted based on the roles.

IIS 7 has the ability to filter all files, including static files which often make up the theme content. So if the user is not loged in, they might not have access to the themed files.

Just a thought. I ran into a similar problem with embedded JavaScript files, since my custom authentication handler denied access to WebResource.axd since the user was not logged in.

asifakhtar

5:51 pm on May 16, 2009 (gmt 0)

10+ Year Member



Hi,

Thanks for replying.

You are right because when I log in it applies the theme but how I can fix this problem.

Ocean10000

4:28 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



putting this into your web.config should exclude your App_Themes folder and subfolders from Authentication.

<location path="App_Themes">
<system.web>
<authorization>
<allow roles="*"/>
</authorization>
</system.web>
</location>