Hosting WCF Services in ASP.NET Compatibility Mode
Bonjour à tous,
j'ai un service WCF hosted in IIS 7.0 et je j'ajoute dans le web.config
Code:
1 2 3
| <system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
...... |
et dans le service:
Code:
1 2
| [AspNetCompatibilityRequirements(
RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] |
mais quand je fais Add Service Reference de ce service dans une application web et je fais le débogage (F11) l'exception suivante se produite lors de l'appel de methode de servive:
The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly.