How does authorization work in asp.net ?, DOT NET Programming

The ASP.NET impersonation is totally controlled by entries in the applications web.config file. Default setting is "no impersonation". You can explicitly describe  that ASP.NET shouldn't use impersonation by including the following code in the file as shown:

It means that the ASP.NET will not perform any authentication and runs with its own priority . By default the ASP.NET runs as an unprivileged account named ASPNET. You can modify  this by making a setting in the processModel part of the machine.config file. Whenever you make this setting, it automatically applies to every site on the server. To the user a high-privileged system account instead of a low-privileged set the userName attribute of the processModel element to SYSTEM. Using this setting is a definite security risk,since  it elevates the privileges of the ASP.NET process to a point where it can do bad things to the operating system.

When you disable impersonation, all the request will run in the context of the account running the ASP.NET: either the ASPNET account or the system account. This is true when you are using anonymous access or authenticating users in few fashion. After the user has been authenticated, the ASP.NET uses its own identity to request access to resources.

The second possible setting is to turn on impersonation.

In this situation , the ASP.NET takes on the identity IIS passes to it. If you are allowing anonymous access in the IIS, this means that ASP.NET will impersonate the IUSR_ComputerName account that IIS itself uses. If you aren't allowing anonymous access,ASP.NET will take on  credentials of the authenticated user and made  requests for resources as if it were that user. Hence  by turning impersonation on and using a non-anonymous method of authentication in IIS, you can let users log on and use their identities within your ASP.NET application.

Finally, you can specify a particular identity to use for all authenticated requests

With this setting, all the requests are made as the specified user (Assuming that the password it correct in the configuration file). So, for e.g. you can designate a user for the single application, & use that user's identity every time someone authenticates to the application. The main drawback to this method is that you must embed the user's password

In the web.config file in the plain text. Although the ASP.NET won't allow anyone to download this file, this is still a security risk if anyone can get the file by some other means.

Posted Date: 9/22/2012 5:01:08 AM | Location : United States







Related Discussions:- How does authorization work in asp.net ?, Assignment Help, Ask Question on How does authorization work in asp.net ?, Get Answer, Expert's Help, How does authorization work in asp.net ? Discussions

Write discussion on How does authorization work in asp.net ?
Your posts are moderated
Related Questions
Find out the Factorial - C# Program I've been trying so many codes for this but those codes didn't work well. Please write the code for find out the factorial of an integer nu

Have you ever worked with Microsoft Application Blocks, if yes then which? The Application Blocks are C# & the VB.NET classes distributed as the Visual Studio projects which ca

What is difference between System.String and System.StringBuilder classes? String and StringBuilder classes are used to store string values but the dissimilarity in them is tha

What is a static constructor? Static constructors are introduced with C# to initialize the static data of a class. CLR calls the static constructor before the initial instance

What are the features of ADO.Net ?  ADO.NET features: 1. Disconnected Data Architecture 2. Data cached in Datasets 3. Data transfer in XML format 4. Interaction wit

What are resource files? The Resource files are the files which contain program resources. Many programmers think that resource files are used only for storing strings. But you

Advertizing Project Description: I am preparing a MLM business. I can need direct mailing and coupon books as a product in my website. Skills required are .NET, C# Program

I need Windows 8.1 Project, Asset management slate App Project Description: We are seeking a Windows 8 app developer with PROVABLE experience to prepare a project and asset m

What is a Class in dot Net? The class describes all the attributes of objects, as well as the methods which implement the behavior of member objects. It is a comprehensive data

Import Columns of Data into Data Table for Data Grid View in C# and WPF Need help with a project in C# / WPF. Trying to read a csv file or text file with columns of data that wi