|
|
Subject:
VB ASP.NET Cookie Based Authentication Code - How To?
Category: Computers > Programming Asked by: sailor94708-ga List Price: $25.00 |
Posted:
17 Dec 2002 09:39 PST
Expires: 16 Jan 2003 09:39 PST Question ID: 126038 |
I need the following: Code for authenticating a user using cookies. The platform is NT, .Net VB ASP using IIS. Description: . Forms authentication, a simple html form on the client side is used to collect the user credetials. The html form submits the user credentials to the application for authentication. If the user is authenticated, the application issues a cookie to the user. (Forms authentication is also called cookie-base authentication). If the requested resource does not contain the cookie, the application redirects the user to the login page. The user credentials are stored in SQL Server. Requirements: . Need the VB code for the above description. - Cookie code, and where to place it. . VB code on handling the cookie. - Code should cover logic on how to determine if this person has been logged in and handling userids and passwords. I want a working solution. Please don't respond if you are unsure of what I'm talking about. |
|
Subject:
Re: VB ASP.NET Cookie Based Authentication Code - How To?
Answered By: theta-ga on 17 Dec 2002 10:58 PST Rated: |
Hi sailor94708-ga, Implementing Forms based authenticationn involves the following steps : - Modify the web.config file to configure your web application to deny anonymous access - Modify web.config file to specify authentication mode as Forms. Here you also specify the cookie that will be used by your application for authentication. - Create a aspx login page that accepts user id and password and sets authentication cookie - Modify web.config to specify a page that will be acting as login page - You can now create the other pages of our site. If the user tries to view any of these pages without first logging in, he will be automatically redirected to the login page you specified in web.config You can find the required ASP.net and VB.net code, with step by step instructions for implementing Formbased authentication using an SQL database, in the following MS KnowledgeBase Article : - Microsoft Knowledge Base Article - 308157 HOW TO: Implement Forms-Based Authentication in Your ASP.NET Application by Using Visual Basic .NET ( http://support.microsoft.com/default.aspx?scid=KB;en-us;Q308157 ) Alternatively, you can download and run the code for a sample .net project which implements the steps specified above from : - DotNetBips :Forms authentication in ASP.NET by Bipin Joshi ( http://www.bipinjoshi.com/displayarticle.aspx?id=9 ) The following articles should help you gain a better understanding of the options available to you : - CodeNotes : NET080016 - ASP.NET Authentication ( http://www.codenotes.com/do/articles/article?articleID=661 ) - ASP.NET QuickStart tutorial: Forms-Based Authentication ( http://samples.gotdotnet.com/quickstart/aspplus/default.aspx?url=/quickstart/aspplus/doc/formsauth.aspx) Hope this helps. If you need any clarifications, just ask! Regards, Theta-ga :) ================================== Google Search Terms Used : cookie based authentication using vb.net asp | |
| |
|
sailor94708-ga rated this answer: |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |