Hello
I wrote WCF duplex service . This service works in Visual Studio, but when I publish this service and put it in IIS, Service don't answer to any Client .
All clients connect to this service. They are also called Service Well, and there are no exceptions.
They differ only between these services (Internet Information Services and IIS). For instance:
* IIS address http: //localhost/SmsService/SmsService.svc or better, this is the address of the virtual path.
* Host service address VS http: // localhost: 1408 / SmsSrevice.svc . absolutely I changed Server address for client's.
Here is the Service / Application Configuration:
VS Hosted Service
<system.serviceModel> <services> <service name="SmsService.Business.SmsService" behaviorConfiguration="ServiceBehavior"> <endpoint address="http://localhost:1408/SmsService.svc" binding="wsDualHttpBinding" contract="SmsService.Business.ISmsService"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <behaviors> <serviceBehaviors> <behavior name="ServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors>
IIS hosting
<system.serviceModel> <services> <service name="SmsService.Business.SmsService" behaviorConfiguration="ServiceBehavior"> <endpoint address="" binding="wsDualHttpBinding" contract="SmsService.Business.ISmsService"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <behaviors> <serviceBehaviors> <behavior name="ServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors>
Client configuration
<system.serviceModel> <bindings> <wsDualHttpBinding> <binding name="WSDualHttpBinding_SMSService" closeTimeout="00:10:00" clientBaseAddress="http://MyMachinName:10300/SmsClientService" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" /> <security mode="Message"> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /> </security> </binding> </wsDualHttpBinding> </bindings> <client> <endpoint address="http://SERVER1/SmsService/SmsService.svc" binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_SMSService" contract="ServiceReference.SMSService" name="WSDualHttpBinding_SMSService"> <identity> <dns value="localhost" /> </identity> </endpoint> </client>
Even I wrote an event log in the first of the service methods, but this does not work!
so what's the problem?
Change 1
Thank you all first
Secondly, I think I am not explaining my question clearly. โThis service work is Fine in Visual studio,โ see VS. I can communicate with the server through the client (in the same solution in VS with the service). The client can call the service, as well as the service can call the client, as well as work (any calculations, callbacks, database actions, etc.).
But when I publish this service, which itself does the work in VS, in IIS, which does not work normally (even on my own computer). This means Client can create service object and connect to that IIS Hosted Service , but when servicing a clientโs call, there are no events (calculation, callback, database actions) and Service also don't call Client's .
I do not understand if any step of my code had an error that should happen at runtime in VS. So there must be something I missed, like security config, client side config or something else