ASP.NET impersonation problem

假如想象 提交于 2020-01-05 04:57:27

问题


I am trying to get my IIS 7.5 to impersonate the account of the user accessing a site through a browser.

If I use...

    <identity impersonate="true" userName="mydomain\myusername" password="mypassword" />

it works just fine. However, if I use...

    <identity impersonate="true" />

It won't pick up the user. Am I missing some code? Or is this an IIS 7.5 configuration issue?


回答1:


I posted a previous answer, but I think this one applies better

Try to select if you are using a specific user or pass through. Not 100% sure if this solves your problem, just trying to help!




回答2:


On the enabling impersonation, check what types of security you have enabled:

  • Open IIS

  • Go to your site, click on it

  • Click on authentication (a blue guy with a lock icon)

  • Make sure you have ASP.NET impersonation enabled

Impersonation should be enabled




回答3:


You have to configure IIS to pass the security token to ASP.NET. See here




回答4:


Did you try turning on Windows Authentication?



来源:https://stackoverflow.com/questions/5985153/asp-net-impersonation-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!