J'utilise une page de connexion SharePoint qui contient le bouton d'une application SilverLight, la page de connexion sera chargée du côté client et en appuyant sur le bouton, l'application SilverLight doit ouvrir le service WCF local qui est installé sur la machine cliente et générer un OTP, mais dans mon cas cela ne se produit pas.Une erreur est survenue lors de la tentative de demande URI: http: // localhost: XXXXX/XXXX
Le WCF Uri que j'utilise est comme ceci http://localhost:12345/service et quand j'appuie sur le bouton sur la page de connexion et j'ai remarqué dans le fiddler que l'appel va comme http://localhost:12345/clientaccesspolicy.xml.
J'ai également placé ClientAccessPolicy.xml et CrossDomain.xml dans le dossier racine du système et dans le dossier du projet.
J'ai aussi essayé de donner le clientaccesspolicy.xml par le service WCF, mais qui ne fonctionnait pas
Voici la trace complète pile de l'erreur.
{System.ServiceModel.CommunicationException: An error occurred while trying to make a request to URI 'http://localhost:XXXXX/XXXXX'.
This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place,
or a policy that is unsuitable for SOAP services.
You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent.
This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute.
Please see the inner exception for more details. ---> System.Security.SecurityException ---> System.Security.SecurityException: Security error.
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__0(Object sendState)
--- End of inner exception stack trace ---
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
--- End of inner exception stack trace ---
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at SLLogin.iCubeWCFsvc.Service1Client.Service1ClientChannel.EndGenKey(IAsyncResult result)
at SLLogin.iCubeWCFsvc.Service1Client.SLLogin.iCubeWCFsvc.IService1.EndGenKey(IAsyncResult result)
at SLLogin.iCubeWCFsvc.Service1Client.OnEndGenKey(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}