Accessing a secure service using WPF API

685
4
03-17-2011 08:39 AM
NANA
by
New Contributor
Hello,

I'm trying to display a simple map control with one dynamic layer. I started with code similar to the simplest example here: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm.
This code works on a sample silverlight application using silverlight API I made.
The WPF application crashes with 401 error without details.

If I'm setting the Credentials property to a privileged user it runs but it displays a blank screen and in the eventviewer of the server I'm seeing few success audit messages and after them a few failure audit messages from Kerberos with that message: "unknown username or bad password" and no other details. My company's network is using Windows authentication.

If I'm running fiddler it works.

Hope someone can help.

Thanks,
Evgeny
0 Kudos
4 Replies
JenniferNery
Esri Regular Contributor
When you define the layer that use a secured service, you need to set Credentials property.

<esri:ArcGISDynamicMapServiceLayer Url="mysercuredserviceurl" Credentials="{StaticResource MyCredentials}" InitializationFailed="Layer_InitializationFailed" Initialized="Layer_Initialized"/>


Your server must have Anonymous Authentication Disabled and Windows Authentication Enabled. Otherwise, Credentials will be ignored even if it was supplied. The following link might be helpful: http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//0093000000pz...
0 Kudos
NANA
by
New Contributor
As I wrote in my original post, I was using the Credentials property.

I checked your suggested configuration and it seems that we are already using this configuration.

We are using ArcGIS server 9.3.1.
Maybe it is the reason that it doesn't work?
0 Kudos
BernardNtiamoah
New Contributor
I don't know about WPF API but in silverlight api,  we've set up a proxy page and all the request to our services are directed to this proxy page for credentials. If its intranet application, then we use window authentication to access the service. If you want to know more about the proxy page set up let me know.

Bernard
0 Kudos
JenniferNery
Esri Regular Contributor
I think the following server doc is applicable for ArcGIS Server 9.3.1 http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#implement_security.htm

What version of WPF API are you using?
0 Kudos