J'ai créé une application Sync Framework basée sur le following sample from microsoft et l'ai déployée sur une nouvelle machine Windows 7 à des fins de test. L'application fonctionne ok mais quand je tente de communiquer je reçois l'erreur suivante:Application WCF déployée sur une machine Win7 et obtention d'une erreur de connexion refusée
Could not connect to http://localhost:8000/RelationalSyncContract/SqlSyncService/ . TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8000.
Je me demande s'il y a quelque chose qui me manque. Ceci est ma première expérience en utilisant WCF et a suivi l'exemple de code Microsoft. J'ai désactivé le pare-feu et ouvert le port 8000 pour TCP et UDP. Je ne sais pas quoi regarder ensuite. Ci-dessous est mon fichier App.config si cela aide:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true"/>
<httpRuntime maxRequestLength="32768" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<services>
<service behaviorConfiguration="WebSyncContract.SyncServiceBehavior" name="WebSyncContract.SqlWebSyncService">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="largeMessageHttpBinding" contract="WebSyncContract.ISqlSyncContract">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/RelationalSyncContract/SqlSyncService/"/>
</baseAddresses>
</host>
</service>
</services>
<bindings>
<wsHttpBinding>
<!-- We are using Server cert only.-->
<binding name="largeMessageHttpBinding" maxReceivedMessageSize="204857600">
<readerQuotas maxArrayLength="1000000"/>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="WebSyncContract.SyncServiceBehavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="True"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
Merci, votre aide est très appréciée.
I pense qu'il peut avoir quelque chose à faire Hôte de service WCF ne démarre pas .. donc besoin de trouver comment démarrer cela sur la machine de déploiement .. Visual Studio démarre automatiquement .. – Belliez