Webpage does not show master page contents, Authentication=forms

Posted by Joggee | ASP.NET Tips, ASp.NET 2005, Web Config | Thursday 11 December 2008 6:21 pm

I was using form authentication in a web config and I have a Login.aspx page that I created based upon a “MasterPage.master” page.  Everything looks okay at design time but when I build the form and see in a broswer It was quit amazed that content of MasterPage were not displayed even no formatting, Even no  MasterPage.master or CSS were effecting.

I done configuration in a web config so If User start with “Default.aspx” It will be taken to the “Login.aspx” page because of below configuration settings.

    <authorization>
        <deny users=”?” />
    </authorization>
 Â
    <authentication mode=”Forms”>
      <forms loginUrl=”Login.aspx” path=”/” />
    </authentication>

I went into deep and come to know once you use authentication mode is equal to form, CSS or APP_THEME, or any content from master page are LOCKED.

You need to unlocked all the folder to get effect.

<location path=”Path of your CSS and Image file”  allowOverride=”true”> �
            <system.web>
                  <authorization>
                        <allow users=”*” />
                  </authorization>
            </system.web>
      </location>

Note : If you wanted to give more than one folder permission, you need to repeat the same code again and again.

Location tag should be placed properly otherwise It wont work.

Joggee.

3 Comments »

  1. Comment by Naveed Mazhar — December 15, 2008 @ 7:49 am

    Thanks for sharing great information.

  2. Comment by Tony — November 12, 2009 @ 11:19 pm

    Thank you, Joggee. This has been bothering me and I’m happy you found a solution and are willing to share it.

  3. Comment by Kumar — November 28, 2009 @ 7:58 pm

    Thanks for the tip

RSS feed for comments on this post. TrackBack URI

Leave a comment