Azure VPN WCF错误代码无法理解标头

时间:2019-03-06 04:40:29

标签: azure wcf vpn

请问有人可以提供输入吗? 将WCF服务部署到Azure VPN时出现此错误。 如果我连接到IIS或Visual Studio开发环境上托管的服务,则没有问题 该服务配置为使用SSL,用户名Basichttpbinding。 Azure VPN托管服务和VS开发人员环境上的绑定相同。 在这两种情况下,我都有WCF日志,它们看起来很像。从哪里开始故障排除?

   <binding name="httpsCertificateBinding" closeTimeout="01:01:00"
      openTimeout="01:01:00" receiveTimeout="01:10:00" sendTimeout="01:01:00"
      allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
      maxBufferSize="2147483646" maxBufferPoolSize="2147483646" maxReceivedMessageSize="2147483646">
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647"
            maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
       <security mode="TransportWithMessageCredential">
         <message clientCredentialType="UserName"/>
         <transport clientCredentialType="None"></transport>
       </security>
    </binding>


 <behavior name="DefaultBehavior">
          <serviceMetadata  httpGetEnabled ="true" httpsGetEnabled ="true"  />
          <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
            <serviceCredentials>
            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="CustomMembershipProvider"/>
          </serviceCredentials>
         <useRequestHeadersForMetadataAddress />
         </behavior>

错误:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns="">s:MustUnderstand</faultcode>
<faultstring xml:lang="en-US" xmlns="">The header 'Security' from the namespace 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' was not understood by the recipient of this message, causing the message to not be processed.  This error typically indicates that the sender of this message has enabled a communication protocol that the receiver cannot process.  Please ensure that the configuration of the client's binding is consistent with the service's binding. </faultstring>
</s:Fault>
</s:Body>
</s:Envelope>

请求:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <s:Header>
    <ActivityId CorrelationId="22b7f6e5-39c7-4c00-a295-9031a98236a6" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">fc8345bc-575a-4ba7-a9c2-71e39bc50bf4</ActivityId>
        <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <u:Timestamp u:Id="_0">
                <u:Created>2019-03-05T22:25:35.059Z</u:Created>
                <u:Expires>2019-03-05T22:30:35.059Z</u:Expires>
            </u:Timestamp>
            <o:UsernameToken u:Id="uuid-0c895b96-82ef-440f-80ed-571bc08d3064-1">
                <o:Username>
                <!-- Removed-->
                </o:Username>
                <o:Password>
                <!-- Removed-->
                </o:Password>
            </o:UsernameToken>
        </o:Security>
    <To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://aces/Services/2019/Image.svc</To>
    <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://hhh.com/ws/mgSrch</Action>
    </s:Header>
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    </s:Body>
</s:Envelope>

0 个答案:

没有答案