views:

45

answers:

3

Hello friends,

I am using

<authentication mode="Forms" >
  <forms loginUrl="login.aspx"
    name=".ASPXFORMSAUTH"  />
</authentication>

Every thing works fine except that, there are some pages like About Us, Contact Us, Privacy Policy etc, which do not need to login to view them.

In my case i need to login to view all pages. I want these common pages to be viewable without having to log on.

I have tested my application on local IIS as well as on deployment server, but same problem occurs.

Please help!

Thanks for sharing your valuable time.

+2  A: 

Appearantly you want some pages to be available without logging in. The way to go about this is to set permission on subdirectories instead of the website root, and put these pages in the web root (usually they are in teh root)

If thats too much work, put your pages in a directory and allow anonymous users to access it.

Midhat
I suggest you use the "Administrer website " tool included with visual studio. Click ASP.Net configuration on the website menu
Midhat
+1  A: 

There could be a large number of possible answers to such an open question. We will need more specifics to answer. Here are just a few places to look:

Have you checked your web.config file to see if anonymous authentication is off?

Have you checked the web.config to see if you are denying anonymous users access to your root directory?

Have you checked IIS to see if anonymous authentication is off?

Have you checked the pages' source code files to see if you are doing manual denial of service to anonymous users?

Krisc
+2  A: 

You need to create exceptions to your security policy:

<!-- files in the "Public" folder don't require authorization -->
<location path="Public">
    <system.web>
        <authorization>
            <allow users="*"/>
        </authorization>
    </system.web>
</location>

Alternately, you can make page-specific exceptions:

<location path="AboutUs.aspx">
    <system.web>
        <authorization>
            <allow users="*"/>
        </authorization>
    </system.web>
</location>
Jeff Sternal