I really need help here. I'm trying to deploy a .NET WCF Application I have been working on for the past month for the first time.
I'm using IIS 7 as my WCF host, and working with wsHTTPBinding because I need to use Session object to store credentials. My client is a WPF App that use MVVM pattern with Caliburn.Micro.
So far, I manage (I think) to succesfully create the service on IIS. If I browse "http://localhost/Ohmio/OhmioService.svc" i see the "You create a service" message. But when I run my client and try to connect to it, my App close with an error "the application has stoped working..." bla bla bla.
This is my server Web.Config:
<?xml version="1.0"?>
<configuration>
<appSettings/>
<system.web>
<compilation targetFramework="4.0"/>
<authentication mode="Windows"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
<system.webServer>
<directoryBrowse enabled="true"/>
</system.webServer>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="myBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="200" maxStringContentLength="8388608" maxArrayLength="16384" maxBytesPerRead="2147483647" maxNameTableCharCount="16384" />
<security mode="None" />
<reliableSession enabled="true" />
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="WcfService1.Service1Behavior" name="WcfService1.OhmioSVC">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="myBinding" contract="WcfService1.IOhmioSVC" >
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfService1.Service1Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
And this is the Client App.Config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IOhmioSVC" maxReceivedMessageSize="20000000"/>
<security mode="None" />
<reliableSession enabled="true" />
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/Ohmio/OhmioService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IOhmioSVC" contract="OhmioSVC.IOhmioSVC" name="WSHttpBinding_IOhmioSVC">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</client>
</system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
Of couse my application works fine on my develope machine. Please Help! I don't even know where to start looking for the cause.
Thanks!
EDIT
Ok. I put the Try catch as suggested and the error goes:
Exception: Cannot open secure cannel due to security negotiation with remote endpoint.
The inner exception:
This endpoint do not admit the action ... and only proccess WSReliableMessaging