문제

WCF 및 승인에 대한 도움이 필요합니다. 현재 Windows 서비스에서 호스팅 된 .NET 리모 팅 객체로 호출하고 WCF 서비스 (WSHTTPBinding 포함)를 호출하는 클라이언트가 있습니다. WCF 서비스는 메시지 기반 보안과 함께 Windows 인증을 사용하고 있습니다.

Windows 서비스는 특별 계정으로 실행 중입니다. 클라이언트 호출이 .NET 리모 팅 객체에 도착하면 스레드를 사용합니다 .CurrentPrincipal은 클라이언트가 제공 한 원금으로 설정하여 모든 작업이 클라이언트의 자격 증명으로 실행됩니다. 지금까지 문제가 없습니다. 이제 현재 내 현재 문제가 있습니다. WCF 서비스는 클라이언트 사용자 자격 증명으로 호출되어야합니다. Afaik WCF는 WindowsIndity.GetCurrent를 사용하여 통화에 대한 승인 정보를 만듭니다. Thread.currentPrincipal은 전화에 사용하고 싶은 신원을 보유하고 있습니다.

그러나 지금은 WCF 보안 예외 대신이 예외 : System.componentModel.WIN32Exception : 보안 패키지에서 사용할 수있는 자격 증명이 없습니다.

CallStack : System.identityModel.sspiwrapper.acquirecredentitalShandle (String Package, CredentialSe 의도, AuthidentityEx & Authdata)에서 System.ServicEdel.Security.SecurityUtils.getCredentialShandle (String Package, NetworkCredential Credentient, Bolean isserver, String] At System.serviceModel. Security.SecurityUtils.GetCredentialsHandle(SecurityBindingElement sbe, ClientCredentials clientCredentials) at System.ServiceModel.Security.SecurityUtils.GetCredentialsHandle(SecurityBindingElement sbe, BindingContext context) at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.OnOpening() at System.ServiceModel.Security.WrapperSecurityCommunicationObject. system.servicemodel.channels.communicationobject.open (timespan timeout)에서 onopening () system.servicemodel.security.communicationobjectsecuritytokenprovider.open (timespan timeout)에서 system.servicemodel.security.secutil.securecurediiderifoired (security tokenoked) (security toketokeireifired)의 Security topoveried. System.serviceModel.security.securitySessionClientSettings`1.clientsecuritySessionChannel.onopen (TimesPan TimeOut)에서 System.ServicEmodel.CommunicationObject.Open (system.servicemodel.channels.servicechannel.servicechannel.servicechannel.open)에서 meout). .servicemodel.channels.communicationObject.open (timespan timeout)에서 system.servicemodel.channels.servicechannel.callopenonce.servicemodel.channels.servicechannel.icallonce.call (servicechannel, timespan timeounce)의 system.servicemel. System.ServiceModel.Channels.serviceChannel.ensureOpened (system.servicemodel.channels.servicechannel.call (String action, boolean oneway, proxyoperationruntime 운영, 개체, 대상 [] outs, timespan timeout)에서 system.servicemodel.channels.servicechannel.call (문자열 동작, 부울 오너, proxyoperationRuntime 작동, 개체 [] ins, 객체 [] outs)에서 system.servicemodel.channels.servicechannelproxy.invokeservice (imethodcallmessage methodcall, proxyoperationRuntime 작동)에서 system.serviceModel.channels.servicechannelproxy.invoke (imessage message).

모든 도움 마틴에 대한 thx

편집 : 나는 가장 예외로 이어지는 실수를 저질렀다. 왜냐하면 사망자 후 channelfactory를 만드는 것을 잊어 버렸지 만 이제는 또 다른 예외를 얻는다. 시스템을 다루는 방법은 확실하지 않다 : System.io.fileloadexception :로드 할 수 없다. 파일 또는 어셈블리 'System.identityModel.Selectors, 버전 = 3.0.0.0, Culture = Neutral, PublicKeyToken = B77A5C561934E089'또는 그 종속성 중 하나입니다. 필요한 사칭 수준은 제공되지 않았거나 제공된 가장 한 사람 수준이 유효하지 않습니다. (Hresult의 예외 : 0x80070542)

도움이 되었습니까?

해결책

Windows 서비스가 실행중인 사용자는 사용자를 가장해야합니다.

"인증 후 고객을 가장하는"라는 권리가 있습니다.

http://blogs.technet.com/askperf/archive/2007/10/16/wmi-troubleShooting-impersonation-rights.aspx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top