Authentication in DOT NET

1. What is the difference between Windows and Forms authentication user lists in Web.config?

User lists for Windows authentication are included in the <authorization> element of Web.config.

User lists for Forms authentications are included in the <credentials> element of Web.config or as part of an external users database or file.

2. How do you require authentication using the Web.config file? (The answer is the same for all ASP.NET authentication modes.)

Include the following <authorization> element to require authentication:

<authorization><deny users="?" /></authorization>

3. How do you run a Web application using the permission set of an authenticated user?

Use the identity element in Web.config to execute code using the authenticated user's account. For example:

<!-- Impersonate the authenticated user -->
<identity impersonate="true" />
What are the types of authentication in .net?
We have three types of authentication:
1. Form authentication
2. Windows authentication
3. Passport
This has to be declared in web.config file

No comments: