How to use impersonation in 2.0

Based on MSDN, I attempted to use the following recommended code snippet in my web.config file.

<authentication mode=...
<identity impersonate="true" username="TestUser" password="P@ssw0rd" />
...
</authentication>
When I launch the application, I receive the following error:
Unrecognized element 'identity"
Does anyone know how to make this work?

stevep01Asked:
Who is Participating?
 
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
Check this link:

How to implement impersonation in an ASP.NET application
http://support.microsoft.com/kb/306158
0
 
k3mConnect With a Mentor Commented:
impersonate goes in the system.web bit not authentication

<system.web>
<identity impersonate="true" userName="myUser" password="myPassword"/>
</system.web>
0
All Courses

From novice to tech pro — start learning today.