TFS에서 작업 항목을 추가하는 ASP.NET 페이지를 작성하려고합니다.IIS7 가장이 TFS 저장소에 액세스하지 못합니다.
내가 가장 및 Windows 인증을 사용하도록 설정 : 페이지에서
<authentication mode="Windows" />
<identity impersonate="true" password="" userName="" />
<customErrors mode="Off" />
를, 내가 TFS를 액세스하고 작업 항목 추가하려고 그러나
TfsTeamProjectCollection prjCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("xxx"));
WorkItemStore store = prjCollection.GetService<WorkItemStore>();
...
을 내가 을 선택하면, 그것은 단지 작동 SpecificUserASP.NET 가장이이고 자격 증명을 저장합니다. 인증 된 사용자이 선택되면 작동하지 않습니다.
SpecificUser가 Authenticated 사용자와 동일한 지 확인했지만 후자의 경우 가장이 올바르게 작동하지 않음을 나타내는 사용 권한 오류가 표시됩니다.
TF30063: You are not authorized to access XXX. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.AsyncWebRequest.ExecRequest(Object obj)
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.ProcessHttpResponse(HttpWebResponse response, Stream responseStream, WebException webException, XmlReader& xmlResponseReader)
at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.ExecWebServiceRequest(HttpWebRequest request, XmlWriter requestXml, String methodName, HttpWebResponse& response)
at Microsoft.TeamFoundation.Framework.Client.LocationWebService.Connect(Int32 connectOptions, ServiceTypeFilter[] serviceTypeFilters, Int32 lastChangeId)
at Microsoft.TeamFoundation.Framework.Client.FrameworkServerDataProvider.Connect(ConnectOptions connectOptions)
at Microsoft.TeamFoundation.Framework.Client.FrameworkServerDataProvider.EnsureConnected(ConnectOptions optionsNeeded)
at Microsoft.TeamFoundation.Framework.Client.FrameworkServerDataProvider.get_InstanceId()
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.InitializeInternal()
at Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.InitializeTeamFoundationObject(String fullName, Object instance)
at Microsoft.TeamFoundation.Client.TfsConnection.CreateServiceInstance(Assembly assembly, String fullName)
at Microsoft.TeamFoundation.Client.TfsConnection.GetService(Type serviceType)
at Microsoft.TeamFoundation.Client.TfsConnection.GetService[T]()
at ASP.index_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
다음 변수
는 두 경우 모두에 대해 동일한 모양 :HttpContext.Current.Request.LogonUserIdentity.Name
HttpContext.Current.Request.IsAuthenticated
HttpContext.Current.User.Identity.Name
System.Environment.UserName
System.Security.Principal.WindowsIdentity.GetCurrent().Name
어떤 아이디어?
편집 : 존 아래에 언급 한 바와 같이, 문제가 의 Kerberos 위임에 의해 발생 실제로
.
나는 설명이 완화에 매우 유용 다음 문서 및 첨부 된 도구를 발견 한 다음 IIS 응용 프로그램에 대한 응용 프로그램 풀입니다
DelegConfig - A Tool To help resolve Kerberos authentication and delegation issues
+1 ... ifs의 웹 응용 프로그램으로 "다른 컴퓨터"에 tfs와 인터페이스하는 웹 기반 ui 도구 집합을 배포했습니다. 나는이 게시물에서 설명한 것과 동일한 행동을 관찰하고있다. 알려진 해결 방법은 무엇입니까? 미리 감사드립니다. – culturalanomoly
예. 내 대답에서 "더블 홉"링크를 클릭하십시오. –