여기에 Catch-22 상황이 있습니까? 내 목표는 내가 상속 한 WCF 서비스를 가져와 VM에서 실행하고 내 데스크톱 PC에서 호출하여 테스트하는 것입니다. VM은 회사 도메인이 아닌 작업 그룹에 있습니다. 기본적으로 더 많은 테스트 환경이 필요합니다. 이상적으로 개발자 당 하나씩 (2 ~ 4 명이 필요합니다). 따라서 VM의 아이디어는 각 개발자가 다소 일치하거나 실제 환경 (실제로 두 개의 웹 사이트, 외부/노출 및 내부)을 가진 자체 웹 서버를 가질 수 있다는 것입니다. 내부 서비스에비 도메인 VM에서 WCF 웹 서비스를 실행하려고 시도하면 보안 오류
[VS2010의 .NET 4.0을 사용하여] , 각 방법은이 속성으로 장식 된이 필요한 이유
[OperationBehavior(Impersonation = ImpersonationOption.Required)]
는 아직도 연구하고있다. Webapp이 "내부"서비스를 호출하고 a) 사용자의 자격 증명이 필요하거나 b) PrinciplePermission을 수행 할 수 있기 때문입니다. 사용자가 그룹에 있는지 확인합니다. 저의 관심은 ConsoleTest 프로그램이나 UnitTest 프로그램을 만드는 것입니다.
계약 작업 'EditAccountFamily이'자동 용 Windows ID를 필요
내가 브라우저에서 SVC는을 보려고 할 때이 오류가 발생했기 때문에[OperationBehavior(Impersonation = ImpersonationOption.Allowed)]
:
나는 이런 식으로 허용하도록 변경 인격화. 호출자를 나타내는 Windows ID는 계약서 ('IAdminService', 'http : //tempuri.org/')에 바인딩 ('WSHttpBinding', 'http : //tempuri.org/')으로 제공되지 않습니다.원래 바인딩은 다음과 같이와 그 오류가 발생하지 않습니다.
그러나
가, 내가 웹 서비스가 도메인에없는 때문에이 보안을 해제해야 생각
나는 클라이언트에서 이러한 오류를하는 경향 : 인증이 실패했기 때문에
1) 보안 토큰에 대한 요구를 만족하지 않는 경우 - "SecurityNegotiation가 처리되지 않은했다"의의 InnerException한다.
또는
2) 호출자 "처리되지 않은 SecurityNegotiation했다」의 서비스로의 InnerException 인증되지 않았다.
각 개발자가 자신의 VM에서 작업 할 수 있도록 코드 및 web.config의 구성을 만들 수 있습니까? 또는 VM을 도메인에 가입시켜야합니까?
순열의 수는 거의 끝이없는 것처럼 보입니다. 나는 각각의 오류로 무엇을 할 것인가를 알려주는 Word.doc을 만들기 시작했으나 지금은 내가 붙어있는 catch-22에있다.
감사합니다,
닐
서버 바인딩 :
<bindings>
<wsHttpBinding>
<binding
name="wsHttpEndpointBinding"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="500000000">
<readerQuotas
maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<!-- <security mode="None" /> This is one thing I tried -->
<security>
<message
clientCredentialType="Windows" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior
name="ABC.AdminService.AdminServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and
remove the metadata endpoint above before deployment -->
<serviceMetadata
httpGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true.
Set to false before deployment to avoid disclosing exception information -->
<serviceDebug
includeExceptionDetailInFaults="true" />
<serviceCredentials>
</serviceCredentials>
<!--<serviceAuthorization principalPermissionMode="UseAspNetRoles"
roleProviderName="AspNetWindowsTokenRoleProvider"/>-->
<serviceAuthorization
principalPermissionMode="UseWindowsGroups"
impersonateCallerForAllOperations="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment
multipleSiteBindingsEnabled="true" />
CLIENT :
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IAdminService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://192.168.159.132/EC_AdminService/AdminService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAdminService"
contract="svcRef.IAdminService" name="WSHttpBinding_IAdminService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
업데이트 12/27/2010 : 이 간단한 방법은 SecurityNegotiation 오류 가져옵니다
[OperationBehavior(Impersonation = ImpersonationOption.Allowed)]
public string TestHelloWorldOpen(string name)
{
return "Hello1 " + name;
}
클라이언트 및 서버 바인딩을 게시하십시오. –
@ 그렉 : 바인딩이 – NealWalters
게시 됨 VM을 도메인 외부에 배치하고 있습니까? 개인용 테스트 서버가있는 경우, 특히 Windows 인증을 사용하는 경우 도메인에서 사용하고 싶습니다. 다른 응용 프로그램과 비슷한 문제를 겪고있을 것입니다. –