Déployer service WCF dans IIS 7.5
Je suis novice de la WCF. Je suis à la recherche d'étapes pour déployer WCF sur IIS et consommer le service.
J'ai suivi les étapes pour déployer le Site web sur IIS, également définir la valeur par défaut du document de Service1.svc
Maintenant, quand je suis en train de consommer ce service wcf il me donne l'erreur suivante.
Metadata contains a reference that cannot be resolved: 'http://manish-pc:8000/Service1.svc?wsdl'.
The WSDL document contains links that could not be resolved.
There was an error downloading 'http://manish-pc:8000/Service1.svc?xsd=xsd0'.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Metadata contains a reference that cannot be resolved: 'http://localhost:8000/Service1.svc'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost:8000/Service1.svc. The client and service bindings may be mismatched.
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
If the service is defined in the current solution, try building the solution and adding the service reference again.
Follwing est mon Service de Détails dans le site Web.Fichier de configuration
<system.serviceModel>
<services>
<service behaviorConfiguration="DemoWCF.Service1Behavior" name="DemoWCF.Service1">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/Service1.svc"/>
</baseAddresses>
</host>
<endpoint address="http://localhost:8000/Service1.svc"
binding="basicHttpBinding"
contract="DemoWCF.IService1"
bindingConfiguration="basicBinding">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicBinding" textEncoding="utf-8"></binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DemoWCF.Service1Behavior">
<serviceMetadata httpGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Merci de me guider là où je suis en manque et quels sont les démarches à faire.
Merci.
Vous devez vous connecter pour publier un commentaire.
Après recherche sur google et regarder des vidéos. J'ai finalement trouvé la solution.
Cette erreur se produit en raison de la configuration de IIS que je n'étais pas inquiète.
a). Ensemble .NET Framework version 4.0
b). Le mode pipeline géré : Classique
Et de consommer le Service WCF dans l'application Client.
Cliquez ici pour regarder la vidéo
De bien vouloir mettre à Jour cette question /réponse fil, si vous trouvez plus au sujet de cette.
Merci 🙂