Exception de communication avec service WCF
Bonjour ,
j'ai une application SilverLight qui communique avec un Service WCF .
j'utilise Silverlight 4 , VS 2010 .
Le fichier Web.config contient cette configuration
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="PFE_recuperation.Web.ServiceNoesys.customBinding0" sendTimeout="00:20:00" receiveTimeout="00:20:00">
<binaryMessageEncoding />
<httpTransport />
</binding>
</customBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
<services>
<service name="PFE_recuperation.Web.ServiceNoesys">
<endpoint address="" binding="customBinding" bindingConfiguration="PFE_recuperation.Web.ServiceNoesys.customBinding0"
contract="PFE_recuperation.Web.ServiceNoesys" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel> |
Le fichier ServiceClient.config contient la configuration suivante :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<configuration>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="CustomBinding_ServiceNoesys" sendTimeout="00:20:00" receiveTimeout="00:20:00">
<binaryMessageEncoding />
<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost:1491/ServiceNoesys.svc" binding="customBinding"
bindingConfiguration="CustomBinding_ServiceNoesys" contract="ServiceNoesys.ServiceNoesys"
name="CustomBinding_ServiceNoesys" />
</client>
</system.serviceModel>
</configuration> |
En lançant l'application , j'aurais cette erreur :
Citation:
Une erreur s'est produite en tentant d'effectuer une demande à l'URI 'http://localhost:1491/ServiceNoesys.svc'.
Ce problème peut être dû à une tentative d'accès à un service entre domaines sans qu'une stratégie entre domaines appropriée soit en place,
ou une stratégie inadaptée aux services SOAP. Il est possible que vous soyez contraint de contacter le propriétaire du service pour publier
un fichier de stratégie entre domaines et veiller à ce qu'il autorise l'envoi d'en-têtes HTTP SOAP. Cette erreur peut également être liée à
l'utilisation de types internes dans le proxy de service Web sans utiliser l'attribut InternalsVisibleToAttribute. Consultez l'exception interne
pour plus de détails.
L'Inner Exception est :
Code:
1 2 3 4 5 6 7 8 9
|
{System.Security.SecurityException ---> System.Security.SecurityException: Erreur de sécurité.
à System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
à System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
à System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
--- Fin de la trace de la pile d'exception interne ---
à System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
à System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
à System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)} |
Une aide SVP .
Merci d'avance .