Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We are developing an application using WCF services.
Our client app is a desktop WPF app and we use wsdualhttpbinding protocol to communicate with the server. Everything is working well in our local machines but when we deploy it to the remote server it doesn't work. The application doesn't throw any exception but we see in the log of the server that the request is accepted but we don’t get any response from it.
We think the application works ok since is working in the local machine so the problem is in the .config files.
Our web.config:
XML
<?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <configSections>
            <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, 
                     EntityFramework, Version=5.0.0.0, Culture=neutral,
                     PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
        </configSections>
        <appSettings>
            <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
        </appSettings>
        <system.web>
           <compilation debug="true" targetFramework="4.5" />
           <httpRuntime targetFramework="4.5" />
        </system.web>
        <system.serviceModel>
            <bindings>
                <wsDualHttpBinding>
                    <binding name="WSDualHttpBinding_IReceiverController" closeTimeout="00:00:15"
                      openTimeout="00:00:15" receiveTimeout="00:00:15" sendTimeout="00:00:15"
                      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:00:15" />
                        <security mode="Message">
                            <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
                </security>
            </binding>
            </wsDualHttpBinding>
        </bindings>
        <services>
            <service name="Namespace.Service1" behaviorConfiguration="svcbh">

                <endpoint name="duplexendpoint" address="" binding="wsDualHttpBinding" contract="Namespace.IService1" bindingConfiguration="WSDualHttpBinding_IReceiverController">

                </endpoint>
                <endpoint name="MetaDataTcpEndpoint" address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />       

            </service>
        </services>
        <behaviors>
            <serviceBehaviors>
                <behavior name="svcbh">
                    <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
   </system.serviceModel>
   <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
            <directoryBrowse enabled="true" />
   </system.webServer>
   <entityFramework>
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
   </entityFramework>
</configuration>


And this our app.config:

XML
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
    </configSections>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
    <system.serviceModel>
            <bindings>
                    <wsDualHttpBinding>
                        <binding name="duplexendpoint" clientBaseAddress="http://192.168.1.1">
                                <reliableSession inactivityTimeout="00:00:15" />
                       </binding>
                    </wsDualHttpBinding>
            </bindings>
            <client>
                    <endpoint address="http:////192.168.1.1/Service1.svc" binding="wsDualHttpBinding"
                            bindingConfiguration="duplexendpoint" contract="Namespace.IService1"
                            name="duplexendpoint">
                            <identity>
                                    <servicePrincipalName value="host/SERVIDORWEB" />
                            </identity>
                    </endpoint>
            </client>
        </system.serviceModel>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <dependentAssembly>
                        <assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
                        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
                </dependentAssembly>
            </assemblyBinding>
        </runtime>
</configuration>


Where is the problem?

*The IP number is an example number.
Thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900