[RESOLVED] Cross domain wshttpbinding
Hi all,
I currently have a perfectly working session enable WCF service using wsHttpBinding but I'm having one problem, it does not work if its called from a client that is not the the same domain as the service itself. I searched on google a couple hours and found dome binding examples but nothing seems to work. Here's my current wshttpbinding:
xml Code:
<wsHttpBinding>
<binding name="WSHttpBinding_IProductService" closeTimeout="00:10:00"
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="10:00:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
If you have any idea let me know.
Back to my search now :p
Re: Cross domain wshttpbinding
As usuall I find my answer 20min after posting my question when I already searched for 4 hours :P
In order to use cross domain wcf service with sessions enabled you have to specify a wshttpbinding binding configuration the the server side with the security mode set to "none" :
xml Code:
<wsHttpBinding>
<binding name="wsHttpBindingConfiguration">
<security mode="None" />
<reliableSession enabled="true" />
</binding>
</wsHttpBinding>
You also need this attribute in you service interface and the second one in the service class :
c# Code:
[ServiceContract(SessionMode=SessionMode.Required)]
c# Code:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Single)]