2016-06-21 2 views
2

우리는 타사 C#/.net 서버에 연결하기 위해 C++/WWSAPI 클라이언트를 구축하고 있습니다. 우리는 서버와 함께 작동하는 샘플 C#/.net 클라이언트를 가지고 있습니다. 우리는 또한 우리가 제대로로드하는 인증서를 가지고App.config의 C# /. net <serviceCertificate>에 해당하는 WWSAPI

<behaviors> 
    <endpointBehaviors> 
    <behavior name="TheirBehavior"> 
     <clientCredentials> 
     <serviceCertificate> 
      <defaultCertificate findValue="crypt.theirdomain.com" storeLocation="LocalMachine" storeName="Root" x509FindType="FindBySubjectName"/> 
     </serviceCertificate> 
     </clientCredentials> 
    </behavior> 
    </endpointBehaviors> 
</behaviors> 
<client> 
    <endpoint address="https://zzz.theirdomain.com/TheirService.svc" 
    binding="customBinding" bindingConfiguration="TheirServiceBinding" behaviorConfiguration="TheirBehavior" 
    contract="ProdWS.ITheirService" name="TheirServiceBinding"> 
    <identity> 
     <dns value="crypt.theirdomain.com"/> 
    </identity> 
    </endpoint> 
</client> 

(그렇지 않으면 우리는 호출하기 전에 There was an error when trying to find certificate '...'; Cannot find object or property.를 얻을.)

방법 : 그것은이는의 App.config (client.exe.config가)의 한 우리는 WWSAPI에서 이것을 가능하게합니까? 모든 .net 구성 설정과 해당 WWSAPI 구성 사이의 매핑을 보여줄 수있는 참조가 있습니까? (WS_SECURITY_BINDING에서 설정)

다음 구성은 Invalid certificate credential specification in security binding.을 제공합니다

WS_SSL_TRANSPORT_SECURITY_BINDING sslBind{}; 
sslBind.binding.bindingType = WS_SSL_TRANSPORT_SECURITY_BINDING_TYPE; 
sslBind.localCertCredential = &certCred.credential; 

는 바른 길에이 있습니까?

답변

0

Google은 이러한 접근 방식을 포기했습니다. 그러나 지금까지는 Visual Studio 2015의 무료 버전을 사용하기 시작했으며 MSVC에 코드와 라이브러리를 포팅했습니다.

우리는 C# .dll 프로젝트를 만들고 ".wsdl/.xsd"파일을 "서비스 참조"로 추가 한 다음 해당 프로젝트를 C++에 대한 참조로 추가했습니다. .NET v4.5를 손으로 .vcxproj에 해킹하고/clr을 사용 설정해야하고 lib 때문에 신비한 패치를해야하는 등의 어려움이 있습니다. 그러나 그것을 작동 시키십시오.

"상호 운용성"에 대한 공급 업체의 주장은 불만이었습니다. C#, Visual Studio 2015, 사용중인 것과 정확히 똑같이 연결 한 다음 직접 연결하십시오.

또한 Library.dll.config 파일의 이름을 실행 파일의 Executable.exe.config로 바꿔야합니다. 그렇지 않으면 .NET에서 찾지 못합니다.

관련 문제