I have a couple of shapefiles that i'd like to display in a map that i've created with the ArcGIS js API. I tried creating a service from ArcGIS server but ran into "ArcGIS cannot access the data file." Is there any other way i can create a layer from a shapefile?


1 Answer 1


You can't read a shapefile directly from an ArcGIS js application, you must publish the shapefile through ArcGIS Server.

If ArcGIS cannot access the file maybe it's just a permission issue on the files. You should grant read permission to the ArcGISSOC (10.0) or arcgis (10.1, 10.2) account. If you are using an ArcGIS Server > 10.1 you must also register the directory.

You may take a look this (applies to version 10.2)

  • I've given full control permissions to the files but i'm still getting the error for some reason Oct 23, 2014 at 13:48
  • Which version of ArcGIS Server are you using? How the shapefile is referred in the MXD?
    – Giovanni
    Oct 23, 2014 at 14:35
  • 10.2.1 I created a folder connection to the shapefile folder, dragged the shapefile to a map and I'm trying to share the map as a service. When publishing as a service it requires that i register the folder to the data store. I'm using "\\servername\Data\Shapefiles" as the publisher folder path. I can see that the arcgis account has access to all t he files but i still get "The ArcGIS Server is not able to connect to the specified directory. Please ensure the folder exists and has the appropiate permissions for the ArcGIS Server to access it." Oct 23, 2014 at 14:46
  • 1) check that inside the MXD you're pointing to the UNC path and not the local path. Click DX on the layer -> Source tab
    – Giovanni
    Oct 23, 2014 at 14:49
  • 2) you must give sharing permission to the arcgis user, not file permission only (there are two types of permissions on windows)
    – Giovanni
    Oct 23, 2014 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.