Welcome to WebmasterWorld Guest from 18.206.48.142

Forum Moderators: ocean10000

Message Too Old, No Replies

Problem Setting Theme for Master and content Pages?

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

New User

10+ Year Member

joined:Mar 13, 2009
posts: 5
votes: 0


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?

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

Administrator

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
posts:864
votes: 3


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.

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

New User

10+ Year Member

joined:Mar 13, 2009
posts: 5
votes: 0


Hi,

Thanks for replying.

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

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

Administrator

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
posts:864
votes: 3


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>

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members