Select to view content in your preferred language

error in security

5228
4
11-17-2011 06:46 AM
FranciscoAcosta_Bazán
Occasional Contributor
Hi , I ve error in Silverligth,
I disabled the firewall on both the server and the terminal and security of Internet explorer .


Agente de usuario: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.2)
Fecha: Thu, 17 Nov 2011 13:37:55 UTC

Mensaje: Unhandled Error in Silverlight Application
Code: 4004  
Category: ManagedRuntimeError     
Message: System.Security.SecurityException: A security exception occured while trying to connect to the REST endpoint. Make sure you have a cross domain policy file available at the root for your server that allows for requests from this application. ---> System.Security.SecurityException ---> System.Security.SecurityException: Error de seguridad.
   en System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   en System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
   en System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
   --- Fin del seguimiento de la pila de excepciones internas ---
   en System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   en System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   en System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   en System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
   --- Fin del seguimiento de la pila de excepciones internas ---
   en ESRI.ArcGIS.Client.Layer.OnInitializationFailed(EventArgs e)
   en ESRI.ArcGIS.Client.Layer.Initialize()
   en ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer.<>n__FabricatedMethod8()
   en ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer.<>c__DisplayClass6.<MapServiceInfoInitFailed>b__4()   
Línea: 56
Carácter: 13
Código: 0
URI: http://localhost:1287/PaginaBlancoTestPage.aspx

---------------
considering I've only added the following line:

<
esri:Map x:Name="MyMap" Background="White" >

<esri:Map.Layers>

<esri:ArcGISDynamicMapServiceLayer Url="http://pcserver-ant:80/arcgis/rest/services/GISAntamina_1/MapServer" />

</esri:Map.Layers>

</esri:Map>
0 Kudos
4 Replies
AndrewChapkowski
Esri Regular Contributor
Do you have a client access or cross domain file on your server?

See: http://msdn.microsoft.com/en-us/library/cc197955(v=vs.95).aspx
0 Kudos
FranciscoAcosta_Bazán
Occasional Contributor
0 Kudos
Abdoulaye_Djibril_MademouDIALL
Emerging Contributor
Hello ,
I am a beginner in development, so I do not understand how to solve the problem.
In fact I am trying to build an application by using arcgis API for silverlight  and I have the same problem as you.
So I want you to explain to me simply what I have to do .
thank you
0 Kudos
BijuThavaran
Emerging Contributor
Hello ,
I am a beginner in development, so I do not understand how to solve the problem.
In fact I am trying to build an application by using arcgis API for silverlight  and I have the same problem as you.
So I want you to explain to me simply what I have to do .
thank you



Hi,

You might have this already working but thought would help someone who is new to this concept.

From this link
http://msdn.microsoft.com/en-us/library/cc197955(v=vs.95).aspx

create the 2 files clientaccesspolicy.xml & crossdomain.xml as mentioned in the link  and place it under Default Web Site folder( ISS>Default Web Site>RightClick>Explore >Place the 2 files in this folder).
0 Kudos