ASP.NET MVC3 Windows Authentication Pass Through to TFS

时光怂恿深爱的人放手 提交于 2019-12-12 20:52:43

问题


To simplify my problems i am basically trying to setup an ASP.NET MVC 3 website that will allow users to view work items assigned to them. i have the website views and controllers working. the problems occur when i try to deploy to IIS running on my machine (Win 7). the Windows Authentication used to identify the user and access tfs are not passed through to the webpage automatically as it asks them to login (i do not want this). the Authentication on IIS only has Windows Auth enabled and the web.config has

<authentication mode="Windows" />
<identity impersonate="true" />
<customErrors mode="Off" />

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

does anybody know why this would not work.

Cheers


回答1:


By default, ASP.NET impersonation is disabled. If you enable impersonation, your ASP.NET application runs under the security context of the user authenticated by IIS 7. See Configure ASP.NET Impersonation Authentication. Constrained Delegation via Kerberos is the only way to flow impersonated credentials to a second host. You can get around this by deploying your web application on the TFS App Tier and configuring its app pool to run as the same identity as the TFS web services.




回答2:


You may want to have a look at this MS KB article. I had a similar problem, but around development box hostnames, and this worked for me: http://support.microsoft.com/kb/896861



来源:https://stackoverflow.com/questions/6945080/asp-net-mvc3-windows-authentication-pass-through-to-tfs

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