Guide to Technology

eg: UK or Brides UK or Classical Art or Buy Music or Spirituality
 
eg: UK or Brides UK or Classical Art or Buy Music or Spirituality
 
Business & Money
Technology
Women
Health
Education
Family
Travel
Cars
Entertainment
Featured Sites
SD Editorials
Online Guide and article directory site.
Foodeditorials.com
Over 15,000 recipes & editorials on food.
Lyricadvisor.com
Get 100,000 Lyric & Albums.

Video on Asp Net Web Security

    View: 
Similar Videos
Videos on Add Site Search Engines
Videos on Get Listed In Search Engines
Videos on Jason Mraz Did You Get My Message
Videos on Simply Having A Wonderful
Videos on Ways To Get Him
Videos on Web Site Promotion Tool
Videos on Web Templates For Free
Videos on Site Making Using Google
Videos on Should You Tag and Ping?
Videos on Site Rubix - Not Your Mommas Website Designer
Videos on Site Indexing - Great Eight Tips
Videos on Site Indexing - Great Eight Tips.
Videos on Skyrocket Your Traffic With Viral Video
Videos on Sitemap Generators: Good investment for online businesses
Videos on Site Promotion Using Submission to Web Directories
Videos on SilverGuru versus FreeAdguru
Videos on Size doesnt always matter
Videos on Six Steps To Resell Rights Marketing Success!
Videos on Simple way Increase Traffic
Videos on Site Optimizing Using Great Keywords
 
Youtube
Linking ASP.NET Page to SQL Se...
Youtube
How to Connect .net Applicatio...
Asp Net Web Security
Alastyr
Security with ASP.Net is configured from within the web.config file. This is a standard ASCII file, with an XML format, that is located in the root of your web application. Here is a sample web.config file:
The very first line is standard for a web.config file and has no bearing on the security.
The next section specifies that you are configuring the security for this web application. First we set the authentication mode to use a cookie in this specific example. You can specify a unique name for your cookie. In ASP.Net Beta 1 you could also set a decryption key but this is now controlled at the server-level in the machine.config file. This section also specifies the page or URL that will contain the authentication code (login.aspx in this case) and how long the authentication cookie should be persisted.
The next two lines specify valid usernames and passwords for this web application. As far as I know there is no limit to the number of user accounts you can place in the web.config, but if there were a large number - or if they change frequently - it might be better to place this information in an external file like a database or an XML file instead (I'll show this in a future article).
Now that we have specified some valid logon accounts, we need to actually specify that we want to password protect. For this example I have decided to password protect a folder under the web root named "admin". The "location path" attribute specifies this folder as the one we will manage. Once we have specified the path to manage, we can work with specific settings - we are interested in the "authorization" setting for this folder. We set the authorization to deny all non-authenticated users (deny users="?").
For the config.web, that is all that is needed. If someone tries to access the /admin/ folder and the user has not already authenticated, they will be redirected to the /login.aspx page.
Now of course this is only half the battle. We now need to create the login.aspx page to actually allow the user to authenticate to our application.
Here is the complete source of the sample login.aspx page:
<%@Page Language="VB" Trace="false"%>
<%@ Import Namespace="System.Web.Security" %>
Username:

Password:

Let's look at the bottom half of the page first. This is fairly straight-forward HTML format. These aren't actually "true" HTML tags, but rather ASP.Net HTML controls that will render HTML page to the client browser (you can tell the difference because the runat="server" tag at on the control). This is a form that accepts a username and password. When the submit button is clicked, this page executes the code located in the subroutine named "Login".
Inside of the Login method we use the FormsAuthentication object. The first line of the sub actually passes the entered username and password over to the object, which in turn compares this information to the values in the web.config file. If the values match, then the next line writes a cookie to the browser and redirects the user back to the original URL which was requested. The second value listed (false) tells the browser not to persist the cookie. So if this user authenticates, closes their browser, opens it again, and tries the secure URL - they will need to authenticate again.
If the username and password entered did not match, an error message is displayed to the screen and the visitor is allowed to enter a new username and password to try again.
This is a simple example and I don't cover any of the advanced configurations or options, but with this sample code, you should have a basis to work with if you want to impliment security in ASP.Net
Next Paragraph..
A Guide to Business | Guide to Technology | Guide to Women | Guide to Health | Family Guide to | Travel & Vacations | Information on Cars

EditorialToday Guide to Technology has 3 sub sections. Such as Technology, Increase Adsense Revenue and Information & Technology. With over 20,000 authors and writers, we are a well known online resource and editorial services site in United Kingdom, Canada & America . Here, we cover all the major topics from self help guide to A Guide to Business, Guide to Finance, Ideas for Marketing, Legal Guide, Lettre De Motivation, Guide to Insurance, Guide to Health, Guide to Medical, Military Service, Guide to Women, Pet Guide, Politics and Policy , Guide to Technology, The Travel Guide, Information on Cars, Entertainment Guide, Family Guide to, Hobbies and Interests, Quality Home Improvement, Arts & Humanities and many more.
About Editorial Today | Contact Us | Terms of Use | Submit an Article | Our Authors