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:
First error I’ve get was:
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.
my app.config seems like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<customBinding>
<binding name="SrvPortBinding">
<security defaultAlgorithmSuite="Basic128" authenticationMode="UserNameForCertificate"
requireDerivedKeys="false" securityHeaderLayout="Strict" includeTimestamp="true"
keyEntropyMode="CombinedEntropy" messageProtectionOrder="SignBeforeEncrypt"
messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10"
requireSignatureConfirmation="false">
<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" />
<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" />
<secureConversationBootstrap />
</security>
<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
messageVersion="Soap11WSAddressing10" writeEncoding="utf-8">
<readerQuotas maxDepth="32" maxStringContentLength="98192" maxArrayLength="916384"
maxBytesPerRead="94096" maxNameTableCharCount="916384" />
</textMessageEncoding>
<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" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="https://amms.someDomain.com:443/mmew1/Srv"
binding="customBinding" bindingConfiguration="SrvPortBinding"
contract="InfoMedica1.Srv" name="SrvPort" >
</endpoint>
</client>
</system.serviceModel>
`
then I changed this:
<client>
<endpoint address="https://amms.someDomain.com:443/mmew1/Srv"
binding="customBinding" bindingConfiguration="SrvPortBinding"
contract="InfoMedica1.Srv" name="SrvPort" >
</endpoint>
</client>
to:
<client>
<endpoint address="https://amms.someDomain.com:443/mmew1/Srv"
binding="customBinding" bindingConfiguration="SrvPortBinding"
contract="InfoMedica1.Srv" name="SrvPort" >
<identity>
<dns value="*.someDomain.com"/>
</identity>
</endpoint>
</client>
And now I’ve got exception :
An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
inner exception :Invalid Security Header
Did anyone got that kind of error and got it working?
Can this error occurs because this * char in *.someDomain.com?
I’ve checked time on server and client side is the same. Webservice worked correctly before add this X509 and username/password authentication.
If any further information needed pls ask in comments:)
Edit:
When I tryed to disable Service Certificate Validation like that:
<client>
<endpoint address="https://amms.someDomain.com:443/mmew1/Srv"
binding="customBinding" bindingConfiguration="SrvPortBinding"
contract="InfoMedica1.Srv" name="SrvPort" behaviorConfiguration="DisableServiceCertificateValidation">
<identity>
<dns value="*.someDomain.com"/>
</identity>
</endpoint>
</client>
Exception occurs:
There is no endpoint behavior named 'DisableServiceCertificateValidation'
Thanks for advance:)
It was a problem with webservice. Guy who written it changed something not sure what exactly but it started to work:)
Maybe someone have similar problem so here it is 😉
Thanks for help all interested;)