Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > not enforcing authentication on some page

Reply
Thread Tools

not enforcing authentication on some page

 
 
Abubakar
Guest
Posts: n/a
 
      05-08-2009
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

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      05-08-2009
On May 8, 9:37*am, "Abubakar" <(E-Mail Removed)> wrote:
> 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
 
Reply With Quote
 
 
 
 
Abubakar
Guest
Posts: n/a
 
      05-08-2009
ok thanks very much. I will try this.

"Alexey Smirnov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
On May 8, 9:37 am, "Abubakar" <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JDK 1.5 Compiler not enforcing parameterized type in interface? googlegroups-nospam4me@sneakemail.com Java 2 08-24-2006 07:41 PM
Forms Authentication Fails some times and not some times??? =?Utf-8?B?bWF2cmlja18xMDE=?= ASP .Net 0 03-28-2006 10:48 PM
Templates is not strictly enforcing the output Barn ASP .Net Mobile 0 12-05-2005 05:35 PM
Forms Authentication question: How to have some pages open and some requiring forms authentication Eric ASP .Net 2 02-13-2004 02:14 PM
Enforcing single users David Johnson ASP .Net 1 06-25-2003 11:45 AM



Advertisments