not enforcing authentication on some page


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
 
Ad

Advertisements

A

Alexey Smirnov

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
 
Ad

Advertisements

A

Abubakar

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top