VB ASP.NET Cookie Based Authentication Code - How To?
-
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.
-
Answer:
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 at Google Answers Visit the source
Related Q & A:
- How can I allow user to create posts in website using ASP.NET?Best solution by Programmers
- How to Undo previous action in asp.net?Best solution by forums.asp.net
- How to Search using jQuery ASP.Net?Best solution by Stack Overflow
- How to Play Audio files in ASP.NET?Best solution by Stack Overflow
- How to save high resolution image canvas to server using asp.net?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.