Select to view content in your preferred language

retrieve secure ArcGIS service

630
1
12-13-2011 11:21 AM
KhoaTran1
Emerging Contributor
I'm building an ArcGIS Silverlight web application using ArcGIS Silverlight 2.3, Silverlight 4, and Visual Studio 2010. I'm stuck at retrieving the secured map service.

In the Mainpage.xaml, I have
<esri:ArcGISDynamicMapServiceLayer ID="DynamicLayer"
                    Url="http://URL/MapServer"
                    Initialized="MapServiceLayer_Initialized"
                    InitializationFailed="MapServiceLayer_InitializationFailed" />

In the Mainpage.xaml.cs, under MapServiceLayer_Initialized() method, I have

ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer dynamicServiceLayer =
                sender as ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer;

Debugging, I don't see any layers at all. Then, I realize that I need to do impersonation. So, I use Windows authentication. In my web.config, I have
<identity impersonate="true"
          userName="abc"
          password="abcpass" />-->

After hitting F5, it freezes and doesn't even come to the breakpoint I set in the Mainpage.xaml.cs file. I have tried to replace the username with domain\abc but didn't work either. Am I missing any steps to retrieve the dynamic map service? (I understand it's better to have encrypted impersonation but for some reasons, my ArcGIS integration with VS2010 doesn't work at all and I want the web app to run first before manually encrypting the data. Does it have any effect on my code?)
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
When accessing a secured service from Silverlight application, your web browser handles the authentication process. Please try the steps from this blog post first to identify the cause for blank layers: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/24/Troubleshooting-blank-layers.aspx
0 Kudos