Select to view content in your preferred language

ArcGIS Map Web Part (2.1.1) is unable to connect to ArcGIS's REST services

4257
16
07-17-2012 07:32 AM
PongthepMiankaew1
New Contributor
Hello,

I have a ArcGIS 10 server and I have installed ArcGIS for SharePoint 2.1.1 on my SharePoint 2010 server.
For the ArcGIS Map Web Part, I successfully connected to sampleserver1.arcgisonline.com or sampleserver3.arcgisonline.com, but I tried to browse and connect to my ArcGIS server's REST service, it said "Connection Error: Unable to connect to http://myserver/arcgis/rest/services/mymap/mapserver". I don't understand why?
Because I set the ArcGIS Mapping Connections for this url and successful tested the connection (It could access its ArcGIS Services Directory).

Could you please advise?

Thank you,
Pongthep
0 Kudos
16 Replies
AlagiriVenkatachal
Esri Contributor

For the ArcGIS Map Web Part, I successfully connected to sampleserver1.arcgisonline.com or sampleserver3.arcgisonline.com, but I tried to browse and connect to my ArcGIS server's REST service, it said "Connection Error: Unable to connect to http://myserver/arcgis/rest/services/mymap/mapserver". I don't understand why?



Hi,
I think you might need a ClientAccessPolicy.xml or CrossDomain.xml on your Web Server that is hosting the ArcGIS Server REST Service.

Thanks,
Alagiri
0 Kudos
AlastairClinkscale
Occasional Contributor
Can anyone confirm that, when you want to consume any WMS in the ArcGIS web part, that the host server of the WMS must have the ClientAccessPolicy.xml and/or CrossDomain.xml files installed on the server?

If this is the case, is it not a problem when you want to consume WMSs from other organisations? With more and more GIS data being published as WMS, would we have to contact each organisation that publishes a WMS we wish to consume and ask them to kindly add the url of our SharePoint server to their xml files to enable us to access it (assuming some of these organisations aren't willing to open access to all potential users - eg. for fear of heavy traffic on their server)?

And likewise, if we wish to publish our own WMS for consumption by other organisations, we'd have to add their urls to our .xmls files?

Thanks.
0 Kudos
HolgerSchade
Deactivated User
Can anyone confirm that, when you want to consume any WMS in the ArcGIS web part, that the host server of the WMS must have the ClientAccessPolicy.xml and/or CrossDomain.xml files installed on the server?

If this is the case, is it not a problem when you want to consume WMSs from other organisations? With more and more GIS data being published as WMS, would we have to contact each organisation that publishes a WMS we wish to consume and ask them to kindly add the url of our SharePoint server to their xml files to enable us to access it (assuming some of these organisations aren't willing to open access to all potential users - eg. for fear of heavy traffic on their server)?

And likewise, if we wish to publish our own WMS for consumption by other organisations, we'd have to add their urls to our .xmls files?

Thanks.


I think you are misunderstanding the concept of crossdomain and clientaccesspolicy. If it is a publicly available WMS, the crossdomain.xml and clientaccesspolicy.xml will typically "wildcard" the access to these specific services - so that it is not necessary to include each foreign domain in the xml file. If the WMS shall be restriced in access, you can use the XML files to restrict the access to the WMS to individual computers or domains. So I definitely would suggest to use crossdomain.xml and clientaccesspolicy.xml on your webserver root to allow or restrict foreign access.
0 Kudos
AlastairClinkscale
Occasional Contributor
I think you are misunderstanding the concept of crossdomain and clientaccesspolicy. If it is a publicly available WMS, the crossdomain.xml and clientaccesspolicy.xml will typically "wildcard" the access to these specific services - so that it is not necessary to include each foreign domain in the xml file. If the WMS shall be restriced in access, you can use the XML files to restrict the access to the WMS to individual computers or domains. So I definitely would suggest to use crossdomain.xml and clientaccesspolicy.xml on your webserver root to allow or restrict foreign access.


Holger,

I appreciate that the wildcard can be used but my main question is that, if I want to be able to consume some other organisation's WMS on my SharePoint web part, would they have to have the crossdomain.xml and/or clientaccesspolicy.xml files installed on their server to permit me accessing their WMS?

I am concerned that I could find myself having to ask every organisation that hosts a WMS that I wish to consume to put these .xml files on their server, just so my Silverlight web part can consume it?
0 Kudos
JustinShepard
Deactivated User
adcadc, This isn't really a SharePoint issue. The crossdomain applies to the service so if you can access the service from other applications (i.e. another Silverlight map application or ArcMap) then the host has permission set so that it is accessible and therefore can be used in your SharePoint map too. If you can't access the service from any application then yes you will have to ask the host to grant permission.

To check if a service is configured for crossdomain you can try:
"There is an easy way to check whether a service is set up correctly for cross-domain access. Open a browser and browse to http://service_domain/clientaccesspolicy.xml and then to http://service_domain/crossdomain.xml. If at least one of these is present, is valid, and is configured to allow cross-domain access, then the service will be accessible from domains other than the domain it is in." - http://msdn.microsoft.com/en-us/library/cc197938(v=VS.95).aspx
0 Kudos
HolgerSchade
Deactivated User
Crossdomain policy and clientaccess policy are configuration files of your webserver (specifically IIS) and they affect access to all http requests (this can be the WMS but also all other resources on the webserver). I think you worry too much - the web server administrators who run the WMS should know about the fact that they should have a clientaccesspolicy and crossdomain on their webserver,
0 Kudos
AlastairClinkscale
Occasional Contributor
Thanks for the replies.

I'm wondering, then, if the problem I have is actually nothing to do with the .xml files.

Basically, I've not yet been able to successfully load any WMS feeds into the ArcGIS web part. The basemaps supplied with the web part all work fine, including the Bing ones, after sorting out the key.

But I've tried around 7 or 8 different WMS, all of which I've been able to successfully load into ArcGIS desktop, and ArcGIS.com map viewer and ArGIS Explorer Online, so the WMSs appear to be fine. Yet I can't get any of them to load into the ArcGIS web part - all I get is a message saying "Unable to connect to ...<WMS url>....".

As an example, would somebody mind trying to load into the ArcGIS web part the WMS below? It's hosted by Scottish Natural Heritage and covers Forestry Commission areas in Scotland. It works fine in ArcGIS dektop, ArcGIS.com and both ArcGIS Explorer Desktop and Online, but for me at least, not in SharePoint:

http://mapgateway.snh.gov.uk/ServicesWMS/FCS_Admin_Boundaries/MapServer/WMSServer?

Thanks for any assistance.
0 Kudos
BradCroft
Emerging Contributor
Hi

I'm having the same issue, only ArcGIS Server and SharePoint are on the same development server. I have tried the recommended xml files in various locations (ArcGIS root, IIS root, SharePoint 80 root) to no avail. Did you ever get this resolved?
0 Kudos
AlastairClinkscale
Occasional Contributor
I didn't get this resolved.

It's now been suggested to me that the web part cannot consume WMS without customisation to enable this. Is this true? What is the connections library for if not for WMS connections?
0 Kudos