2014-05-21 3 views
2

BizTalk Server 2013 및 WCF 서비스에 문제가 있습니다. BizTalk는 WCF 서비스를 사용해야합니다. 에 BizTalk X509 인증서 메시지에 서명을 필요로하고 나는 다음과 같은 오류 메시지가 나타납니다BTS 2013 - 메시지에 잘못된 메시지 서명이 있습니다.

There was a failure executing the send pipeline: "BizTalkUtilities.SignPipeline, 
BizTalkUtilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d749e81ab815db56" Source: 
"MIME/SMIME encoder" Send Port: "SndPort_Sign_V2" URI: "http://XXXX/DemoServiceSigned 
/DemoService.svc" Reason: The message has a bad message signature. 

우선 보안없이 서비스를 제작 한 모든 작동합니다. 보안 (메시지 보안, 로그인)을 설정하면 더 이상 작동하지 않습니다. 내 서비스가 잘되었는지 확인하기 위해 보안과 함께 서비스를 사용하는 테스트 WCF 클라이언트를 만들었습니다. 문제 없습니다.

메시지는 X509 인증서를 사용하여 서명해야합니다. 모든 인증서가 올바른 위치에 있습니다. 나는 MSDN에 명시된 정보를 따랐다.

서비스 설정 :

<bindings> 
    <wsHttpBinding> 
    <binding name="clientSignConfig"> 
     <security mode="Message"> 
     <message clientCredentialType="Certificate"/> 
     </security> 
    </binding> 
    </wsHttpBinding> 
</bindings> 

<services> 
    <service name="SignServiceBL.DemoService" behaviorConfiguration="DemoServiceBehavior"> 
    <endpoint address="" 
       binding="wsHttpBinding" 
       bindingConfiguration="clientSignConfig" 
       contract="SignServiceBL.IDemoService" /> 
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
    </service> 
</services> 

<behaviors> 
    <serviceBehaviors> 
    <behavior name="DemoServiceBehavior"> 
     <serviceMetadata httpGetEnabled="true"/> 
     <serviceDebug includeExceptionDetailInFaults="true"/> 
     <serviceCredentials> 
     <clientCertificate> 
      <authentication certificateValidationMode="PeerTrust" trustedStoreLocation="LocalMachine"/> 
     </clientCertificate> 
     <serviceCertificate findValue="CN=DemoServiceServerCertificate"/> 
     </serviceCredentials> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 

클라이언트 설정 (이것은 WCF 클라이언트를 위해 작동하지만, BizTalk에서 작동하지 않습니다)

<bindings> 
    <customBinding> 
    <binding name="demoService_CustomBinding"> 
     <transactionFlow /> 
     <security authenticationMode="SecureConversation" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"> 
     <secureConversationBootstrap authenticationMode="MutualSslNegotiated" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" /> 
     </security> 
     <textMessageEncoding /> 
     <httpTransport /> 
    </binding> 
    </customBinding> 

</bindings> 

<behaviors> 
    <endpointBehaviors> 
    <behavior name="signingBehavior"> 
     <clientCredentials> 
     <clientCertificate findValue="CN=DemoServiceSigning" 
          storeLocation="CurrentUser" storeName="My"/> 
     <serviceCertificate> 
      <authentication certificateValidationMode="PeerTrust" trustedStoreLocation="LocalMachine"/> 
     </serviceCertificate> 
     </clientCredentials> 
    </behavior> 
    </endpointBehaviors> 
</behaviors> 

<client> 
    <endpoint address="http://XXXX/DemoServiceSigned/DemoService.svc" 
     binding="customBinding" bindingConfiguration="demoService_CustomBinding" behaviorConfiguration="signingBehavior" 
     contract="DemoService.IDemoService" name="WSHttpBinding_IDemoService"> 
    <identity> 
     <dns value="DemoServiceServerCertificate"/> 
    </identity> 
    </endpoint> 
</client> 

내가 설치 추적을했지만,에 BizTalk 아니다 심지어 내 서비스에 메시지를 보냈습니다. 그것은 sendpipeline이 요청을 차단하고있는 것과 같습니다.

아이디어가 있으십니까?

당신은 WCF 메시지에 서명하는 MIME/SMIME 인코더 파이프 라인이 필요하지 않습니다

편집 할 수 있습니다. 당신은 당신이 이메일에 서명해야하는 경우 ...이 파이프 라인을 사용하여 인바운드 안전 다목적 인터넷 메일 확장 (S/MIME) 메시지 아웃 바운드 메시지와 서명 확인 서명을 지원 MSDN

BizTalk 서버의 첫 번째 문장을 참조한다

일단 파이프 라인을 제거하면 BizTalk에서 서비스에 메시지를 보냅니다. 이제 문제는 서명되고 암호화 된 것입니다. BizTalk에게 메시지에 서명 만하는 방법을 알아 냈습니다. 아이디어가 있으면 언제든지 게시하십시오. 나는 그것을 찾을 경우는 조금 복잡한에이기 때문에, 나는 그것이

+0

MIME/SMIME 인코더의 설정은 무엇입니까? 호스트 인스턴스 User \ Personal 저장소의 개인 키 인증서가 있고 BizTalk Server 그룹 수준에서 구성되어 있습니까? – Dijkgraaf

+0

예, MSDN의 전체 예제를 따랐습니다. 그것은 작동해야합니다. –

+0

Fiddler와 같은 HTTP deb-buging 도구를 사용하여 BizTalk와 테스트 WCF 클라이언트 모두에서 페이로드가 전송되는지 검사 해 보셨습니까? 어쩌면 당신은 거기에 몇 가지 차이점을 발견하고 문제가 무엇인지 해결할 수 있습니다. – Dijkgraaf

답변

1

그것은 쉬운 일이 아니었다 ;-) 게시 할 예정입니다,하지만 난 그것에 대해 blogpost을 썼다

:-) 내 문제를 해결할 수 있었다 여기서 대답을 만드십시오. 그래서 확인해보세요!

관련 문제