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
 
G

Guest

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
 
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

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top