Select to view content in your preferred language

Problem with Webmap Sample

1191
7
Jump to solution
10-30-2013 07:16 PM
c_f_ong
Deactivated User
Hello

I've been experimenting the Webmap Sample with 10.2 SDK but something seems not be working as expected.

// Keying 'AGSSample' for username and 'agssample' for password as suggested doesn't allow successful login to private webmap

     AGSCredential *credential = [[AGSCredential alloc] initWithUser:username password:password];

    // Recreate the webmap object; this time with the credentials
    self.webMap = [[AGSWebMap alloc] initWithItemId:self.webmapId credential:credential];

Any clue as what maybe the problem?

Thanks.

Rgds
Ong CF
0 Kudos
1 Solution

Accepted Solutions
DiveshGoyal
Esri Regular Contributor
That's strange. I don't know if its something on your internal network that causing it to fail.

Is your device using your internal network through WIFI or is it using cellular data connection instead? Maybe you can try the sample in both these environments to see if the problem can be narrowed down.

Also, can you open the webmap in a browser on the machine where you have the simulator? I'm wondering if the problem affects the entire machine, or just the simulator.

View solution in original post

0 Kudos
7 Replies
DiveshGoyal
Esri Regular Contributor
the username/password is case-sensitive.
Can you confirm you're using the correct case when keying in the credentials?
0 Kudos
c_f_ong
Deactivated User
Hello

Yes, I've keyed in the username (AGSSample) and password (agssample) in the correct case as indicated. The same problem with my own app after I've switched from SDK v10.1.1 u1 to v10.2. That's why I've tested the Webmap sample to confirm the problem. It seems that v10.2 has added some stuff that affected authentication. Please help!

Thanks.

Rgds
Ong CF
0 Kudos
DiveshGoyal
Esri Regular Contributor
I just tried the webmap sample, and it works fine.
What error do you get when it doesn't work?
0 Kudos
c_f_ong
Deactivated User
Hello

After keying in the username (AGSSample) and password (agssample), I've got the following error:

2013-11-05 17:51:09.605 WebmapSample[846:70b] Error while loading webMap: The operation couldn�??t be completed. (com.Esri.ArcGIS.ErrorDomain error 498.)

Before upgrading to SDK v10.2, I didn't get the above error.

Thanks.

Rgds
Ong CF
0 Kudos
c_f_ong
Deactivated User
Hello

I've done more testing. No error when I deploy and run the Webmap Sample on an actual device. The error appears only when I run it in Simulator. Any idea why that maybe the case?

Thanks.

Rgds
Ong CF
0 Kudos
DiveshGoyal
Esri Regular Contributor
That's strange. I don't know if its something on your internal network that causing it to fail.

Is your device using your internal network through WIFI or is it using cellular data connection instead? Maybe you can try the sample in both these environments to see if the problem can be narrowed down.

Also, can you open the webmap in a browser on the machine where you have the simulator? I'm wondering if the problem affects the entire machine, or just the simulator.
0 Kudos
c_f_ong
Deactivated User
Hello

Thanks for your suggestion. I've done more testing. Error appears when I run Simulator with a wired connection but not with WiFi connection. Hence, there's something with the wired connection here that blocks network stuff and causes the authentication error.

Rgds
Ong CF
0 Kudos