Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_security thread: Forms Authentication ( path= "/"


Message #1 by "Payal Parija" <pparija@y...> on Thu, 13 Mar 2003 15:26:43
I having a problem using forms authetication..
when i add this block
<authentication mode="Forms">
 
    <forms name = "AdGeneratorCookie" loginUrl = "User/login.aspx" 
protection = "All" path = "/">
    
    </forms>
    
    </authentication> 
    <authorization>
    <deny users= "?"></deny>
    </authorization>

everytime i hit login it enter the next page but from there onwards if i 
click a link it always sends me back to the login page...
for eg: I have the login page... after i login it sends me to the contents 
page ...
But from the contents page when i click on a link.. it sends me back to 
the login page...
why is this happening... I have reviewed a whole lot of code and i think 
its because of the "path"


the way my website is set up is that login and a few pages are under a 
Folder user in the root dir.

how do i set up the authentication

this is the code in my login.aspx page

if(chkCookie.Checked == true)
Response.Cookies["Login"].Expires = DateTime.Now.AddMonths(1);
FormsAuthentication.RedirectFromLoginPage(usrDetails.strLogin, 
chkCookie.Checked);
				

  Return to Index