Select to view content in your preferred language

Service 'California' of type 'MapServer' does not exist or is inaccessible.

6026
14
06-19-2010 01:57 PM
NoureddineEl-zaatari
Emerging Contributor
Arcgis Server 9.3.1

Service Type: pooled
Web access: Enabled

im clearing the rest cache manually, and getting the MapServer listed, but when accessing it, im getting the following error

Service 'California' of type 'MapServer' does not exist or is inaccessible.

any idea ??

Please esri help..
0 Kudos
14 Replies
NoureddineEl-zaatari
Emerging Contributor
thank you guys for the great support, i finally got it working. it was something related to extensions, some extension properties and info must be set although they are disabled, setting them solved the problem. now the rest for the published map works great,

i really thank you guys for the spontaneous support,
0 Kudos
DavidHollema
Deactivated User
I'm having the same problem with a new map service created programmatically.  I'm seeing the same error when trying to access via REST.  Can you post code on which extension properties you needed to set, specifically to get REST functionality to work?

-Dave
0 Kudos
DavidHollema
Deactivated User
After some more trial-and-error coding, I found a set of properties that enables REST capabilities to work successfully.  I've highlighted the 4 properties that, from a rudimentary test, appear to be required for REST.  None of these 4 properties were documented in any developer help.  What I did was look through a well-formed cfg file that was produced as a result of creating a successful REST map service via ArcMap toolbar.  It would be nice if a developer sample or other documentation was included in the ArcGIS Server SDK to show how to publish a map service programmatically AND enable REST capabilities programmatically.  The missing link to the fully-automated solution is clearing the REST cache programmatically; it looks like this capability is available at 10.

                       
serverObjConfig = null;

                        //create map server object
                        serverObjConfig = (IServerObjectConfiguration3)this.soAdmin.CreateConfiguration();
                        serverObjConfig.Name = newMapServiceName;
                        serverObjConfig.Description = newMapServiceDescription;
                        serverObjConfig.TypeName = "MapServer";
                        serverObjConfig.IsPooled = true;
                        serverObjConfig.MinInstances = 1;
                        serverObjConfig.MaxInstances = 1;
                        serverObjConfig.WaitTimeout = 10;
                        serverObjConfig.UsageTimeout = 120;
                        serverObjConfig.IsolationLevel = esriServerIsolationLevel.esriServerIsolationHigh;
                                                
                        //root serverobjectconfiguration props
                        ESRI.ArcGIS.esriSystem.IPropertySet2 propSet;
                        propSet = (ESRI.ArcGIS.esriSystem.IPropertySet2)serverObjConfig.Properties;
                        propSet.SetProperty("FilePath", mxdFileName);
                        propSet.SetProperty("SupportedImageReturnTypes", "URL");
                        propSet.SetProperty("OutputDir", "c:\\arcgisserver\\arcgisoutput");
                        propSet.SetProperty("VirtualOutputDir", "http://***********/arcgisoutput/");
                        propSet.SetProperty("MaxImageHeight", "2048");
                        propSet.SetProperty("MaxRecordCount","500");
                        propSet.SetProperty("MaxBufferCount", "100");
                        propSet.SetProperty("MaxImageWidth", "2048");
                        propSet.SetProperty("IsCached", "false");
                        propSet.SetProperty("CacheOnDemand", "false");
                        propSet.SetProperty("IgnoreCache", "false");
                        propSet.SetProperty("ClientCachingAllowed", "true");

                        //recycling properties
                        IPropertySet2 recyclingSet = (IPropertySet2)serverObjConfig.RecycleProperties;
                        recyclingSet.SetProperty("StartTime", "00:00");
                        recyclingSet.SetProperty("Interval", "86400");
                        
                        //enable web access
                        ESRI.ArcGIS.esriSystem.IPropertySet2 infoSet;
                        infoSet = (ESRI.ArcGIS.esriSystem.IPropertySet2)serverObjConfig.Info;
                        infoSet.SetProperty("WebEnabled", "true");
                        infoSet.SetProperty("WebCapabilities", "Map,Query,Data");
0 Kudos
KeithAnderson
Occasional Contributor
FYI

Returned this error after I swapped out the Map Service URL in Silverlight.
My map extent envelope coordinates in XAML did not reflect the new corrdinates in the new service.
This returned 'MapServer' does not exist or is inaccessible.

Keith
0 Kudos
JimSomerville
Emerging Contributor
I was getting this error when creating a map service programmatically as well.  Thanks to dhollema, I realized I had left out the "MaxImageWidth" property.

One note, at least for developing against AGS 10, is the REST cache does NOT seem to need to be cleared after creating the new map service.  It was automatically populated for me in the rest/services directory immediately after creation of the new map service.
0 Kudos