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?)