C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







Form Authentication, ask me to login for 2 times if i try to run 2 level from.


Posted Date: 06 May 2008      Total Responses: 2

Posted By: Ripal Patel       Member Level: Gold     Points: 1


I had implement Form Authentication in my project.
i had added following code,

<location path="btnet.css">
<system.web>
<compilation debug="true">
</compilation>
<authentication mode="Forms">
<forms cookieless="UseCookies" loginUrl="default.aspx" defaultUrl="bugs.aspx">
</forms>

</authentication>
<authorization>
<allow users="*"/>
<deny users="?"/>
</authorization>
<pages validateRequest="true"/>

</system.web>
</location>



I had added location tag because acess to css file otherwise Stylesheel applied to all control doen't work.
i had stored login info in database.
i had not write any code(code regarding Form Authentication) in login page,

1).if i run application, it will run fine.
2).if i directly run any form, it aske me two times for login, first time Stylesheet work fine, second time Stylesheet don't work. this things is happen if i run 2). in 1). 's browser, if i run 2). in different it doen't work.





Responses

Author: Shivshanker Cheral    06 May 2008Member Level: DiamondRating:     Points: 2
Question is confusing? can give more details


Author: asdf    14 Aug 2008Member Level: SilverRating:     Points: 0
It’s for validate the anonymous user credentials.
System.Web.Security namespace is needed.
FormAuthenticationModule which is in HttpModule class.
If ticket is present, Security context is created by HttpContext.Current.User property with default instance of GenericPrinciple which contains FormsIdentity instance with the name of currently logged-in user.
Eg.
<authentication mode=”Forms”>
<forms loginUrl=”frmLogin.aspx” timeout=”1”/>
</authentication>

<authorization>
<allow users=”?”/>
<deny users=”?”/>
</authorization>



Post Reply
You must Sign In to post a response.
Next : hi
Previous : Hi to all dotnetspiders
Return to Discussion Forum
Post New Message
Category: [About DotNetSpider]

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

conference calls

Contact Us    Privacy Policy    Terms Of Use