not enforcing authentication on some page

  • Thread starter Thread starter Abubakar
  • Start date Start date
A

Abubakar

Hi,

I'm using forms authentication to enforce security. There is a login.aspx
page that is sepcified as:

<authentication mode="Forms">
<forms loginUrl="login.aspx" protection="All">
<credentials passwordFormat="Clear">
<user name ="jack" password="jack"/>
</credentials>
</forms>
</authentication>

login page is of course accessible to the users without authentication, I
want one more page to be accessible without authentication that will tell my
ajax queries that the user right now is authenticated or not, so that in
case the page is open for sometime and the session times out, I want the
timer to tell the page after every few seconds, so that in case the session
is not valid i'm going to redirect to the login page automatically.

regards,

...ab
 
Hi,

I'm using forms authentication to enforce security. There is a login.aspx
page that is sepcified as:

    <authentication mode="Forms">
      <forms loginUrl="login.aspx" protection="All">
        <credentials passwordFormat="Clear">
          <user name ="jack" password="jack"/>
        </credentials>
      </forms>
    </authentication>

login page is of course accessible to the users without authentication, I
want one more page to be accessible without authentication that will tellmy
ajax queries that the user right now is authenticated or not, so that in
case the page is open for sometime and the session times out, I want the
timer to tell the page after every few seconds, so that in case the session
is not valid i'm going to redirect to the login page automatically.

regards,

..ab

In the configuration section (not in system.web) of the web.config
file add

<location path="default.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

where defaul.aspx is name of your page

More about location: http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx
 
ok thanks very much. I will try this.

Hi,

I'm using forms authentication to enforce security. There is a login.aspx
page that is sepcified as:

<authentication mode="Forms">
<forms loginUrl="login.aspx" protection="All">
<credentials passwordFormat="Clear">
<user name ="jack" password="jack"/>
</credentials>
</forms>
</authentication>

login page is of course accessible to the users without authentication, I
want one more page to be accessible without authentication that will tell
my
ajax queries that the user right now is authenticated or not, so that in
case the page is open for sometime and the session times out, I want the
timer to tell the page after every few seconds, so that in case the
session
is not valid i'm going to redirect to the login page automatically.

regards,

..ab

In the configuration section (not in system.web) of the web.config
file add

<location path="default.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

where defaul.aspx is name of your page

More about location: http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx
 
Back
Top