Silverlight: WCF obtiene un error en el servidor pero localhost funciona bien
Frecuentes
Visto 7,529 veces
5
Tengo la aplicación Silverlight y recibo este error:
[Async_ExceptionOccurred]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.61118.00&File=System.dll&Key=Async_ExceptionOccurred INNER >System.ServiceModel.CommunicationException: [CrossDomainError]
Arguments: http://localhost/pthaba/SimpleWCF.svc
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.61118.00&File=System.ServiceModel.dll&Key=CrossDomainError ---> System.Security.SecurityException ---> System.Security.SecurityException: [Arg_SecurityException]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.61118.00&File=mscorlib.dll&Key=Arg_SecurityException
Tengo un servicio WCF y funciona bien en el navegador. Tengo clientacesspolicy.xml como a continuación en el sitio raíz (donde se encuentra el servicio WCF)
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from >
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
¿Qué estoy haciendo mal? ¿Alguien puede ayudarme?
EDIT:
En mi localhost funciona bien, pero en el servidor no. Fiddler parece estar bien, no hay error en eso.
¿Me estoy perdiendo alguna configuración de IIS?
Más detalles del error arriba:
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__1(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.SendAsyncResult.End(SendAsyncResult 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 Pthaba.SimpleSVC.SimpleWCFClient.SimpleWCFClientChannel.EndGetGameLevelPlataforms(IAsyncResult result)
at Pthaba.SimpleSVC.SimpleWCFClient.Pthaba.SimpleSVC.ISimpleWCF.EndGetGameLevelPlataforms(IAsyncResult result)
at Pthaba.SimpleSVC.SimpleWCFClient.OnEndGetGameLevelPlataforms(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
ult)
1 Respuestas
2
Estaba teniendo el mismo problema y conseguí que el mío funcionara siguiendo este artículo: Hacer que un servicio esté disponible a través de los límites de dominio.
Tuve que hacer un cambio de la siguiente manera que alguien comentó al final de ese artículo:
<allow-from http-request-headers="*">
contestado el 11 de mayo de 12 a las 01:05
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas wcf silverlight silverlight-4.0 iis-7 or haz tu propia pregunta.
¿Dónde se encuentra su archivo de política? - Stainedart
A menudo uso fiddler para inspeccionar este tipo de problemas. Debería ver la solicitud a ClientacessPolicy.xml si la ruta es correcta, etc. violinista2.com/violinista2 - Leo
Hola, el archivo de política se encuentra en root suck como mi service.svc - João Lourenço
Solo para estar seguro, su servicio está dentro de "pthaba", pero ClientacessPolicy debe estar en la raíz, no donde está el archivo svc. Debe estar en la misma carpeta donde está la carpeta pthaba. - Leo
¿Ha encontrado una solución para esto? Tengo el mismo problema hoy? - mservidio