Note that there are some explanatory texts on larger screens.

plurals
  1. PO.net client invoke JAX-WS webservice with X509 certificate and username/password authentication
    primarykey
    data
    text
    <p>I've got a problem with using JAX-WS Webservice from .net client. I'm able to open connection to WS but when I try to use any method then I got this errors:</p> <p>First error I've get was:</p> <p><code>Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was 'amms.someDomain.com' but the remote endpoint provided DNS claim '*.someDomain.com'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity '*.someDomain.com' as the Identity property of EndpointAddress when creating channel proxy.</code> </p> <p>my app.config seems like:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;system.serviceModel&gt; &lt;customBinding&gt; &lt;binding name="SrvPortBinding"&gt; &lt;security defaultAlgorithmSuite="Basic128" authenticationMode="UserNameForCertificate" requireDerivedKeys="false" securityHeaderLayout="Strict" includeTimestamp="true" keyEntropyMode="CombinedEntropy" messageProtectionOrder="SignBeforeEncrypt" messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10" requireSignatureConfirmation="false"&gt; &lt;localClientSettings cacheCookies="true" detectReplays="true" replayCacheSize="900000" maxClockSkew="00:05:00" maxCookieCachingTime="Infinite" replayWindow="00:05:00" sessionKeyRenewalInterval="10:00:00" sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="true" timestampValidityDuration="00:05:00" cookieRenewalThresholdPercentage="60" /&gt; &lt;localServiceSettings detectReplays="true" issuedCookieLifetime="10:00:00" maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="00:05:00" negotiationTimeout="00:01:00" replayWindow="00:05:00" inactivityTimeout="00:02:00" sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="true" maxPendingSessions="128" maxCachedCookies="1000" timestampValidityDuration="00:05:00" /&gt; &lt;secureConversationBootstrap /&gt; &lt;/security&gt; &lt;textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap11WSAddressing10" writeEncoding="utf-8"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="98192" maxArrayLength="916384" maxBytesPerRead="94096" maxNameTableCharCount="916384" /&gt; &lt;/textMessageEncoding&gt; &lt;httpsTransport manualAddressing="false" maxBufferPoolSize="9524288" maxReceivedMessageSize="965536" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="965536" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true" requireClientCertificate="false" /&gt; &lt;/binding&gt; &lt;/customBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="https://amms.someDomain.com:443/mmew1/Srv" binding="customBinding" bindingConfiguration="SrvPortBinding" contract="InfoMedica1.Srv" name="SrvPort" &gt; &lt;/endpoint&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; </code></pre> <p>`</p> <p>then I changed this:</p> <pre><code>&lt;client&gt; &lt;endpoint address="https://amms.someDomain.com:443/mmew1/Srv" binding="customBinding" bindingConfiguration="SrvPortBinding" contract="InfoMedica1.Srv" name="SrvPort" &gt; &lt;/endpoint&gt; &lt;/client&gt; </code></pre> <p>to:</p> <pre><code>&lt;client&gt; &lt;endpoint address="https://amms.someDomain.com:443/mmew1/Srv" binding="customBinding" bindingConfiguration="SrvPortBinding" contract="InfoMedica1.Srv" name="SrvPort" &gt; &lt;identity&gt; &lt;dns value="*.someDomain.com"/&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/client&gt; </code></pre> <p>And now I've got exception : <code>An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.</code> <strong>inner exception :</strong><code>Invalid Security Header</code></p> <p>Did anyone got that kind of error and got it working? Can this error occurs because this <code>*</code> char in <code>*.someDomain.com</code>? </p> <p>I've checked time on server and client side is the same. Webservice worked correctly before add this X509 and username/password authentication.</p> <p>If any further information needed pls ask in comments:)</p> <p><strong>Edit:</strong></p> <p>When I tryed to disable Service Certificate Validation like that:</p> <pre><code>&lt;client&gt; &lt;endpoint address="https://amms.someDomain.com:443/mmew1/Srv" binding="customBinding" bindingConfiguration="SrvPortBinding" contract="InfoMedica1.Srv" name="SrvPort" behaviorConfiguration="DisableServiceCertificateValidation"&gt; &lt;identity&gt; &lt;dns value="*.someDomain.com"/&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/client&gt; </code></pre> <p>Exception occurs:</p> <pre><code>There is no endpoint behavior named 'DisableServiceCertificateValidation' </code></pre> <p>Thanks for advance:) </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload