Customer Service | Training | Contact Us
You are here: Home > User Forums > arcgis server forums > Thread Replies

ArcGIS Server Forums

ArcGIS Server: REST API forum

Installation Problem   Jim Tochterman Jul 07, 2008
Re: Installation Problem   Dan Downing Aug 13, 2008
Re: Installation Problem   Deona Evans Aug 21, 2008
Re: Installation Problem   Joshua DiLuciano Aug 25, 2008
Re: Installation Problem   Jim Tochterman Aug 25, 2008
Re: Installation Problem   Joshua DiLuciano Aug 25, 2008
Re: Installation Problem   Deona Evans Aug 26, 2008
Re: Installation Problem   Joshua DiLuciano Sep 03, 2008
Re: Installation Problem   Clint Garrison Sep 15, 2008
Re: Installation Problem   Clint Garrison Sep 15, 2008
Re: Installation Problem   Mark Greninger Oct 14, 2008
Re: Installation Problem   Deona Evans Nov 14, 2008
Re: Installation Problem   Atley Davidson Nov 14, 2008
Re: Installation Problem   Atley Davidson Nov 14, 2008
Re: Installation Problem   Atley Davidson Nov 14, 2008
Re: Installation Problem   Bill MacPherson Dec 09, 2008
Re: Installation Problem   Gregory Michael Mar 11, 2009
Re: Installation Problem   Matthew Malinowski May 04, 2009
Re: Installation Problem   Aaron Weier Jul 07, 2009
Re: Installation Problem   kai wang Aug 12, 2009
Report Inappropriate Content • Top • Print • Reply    
Subject Installation Problem 
Author Jim Tochterman 
Date Jul 07, 2008 
Message I just got my 9.3 "final" software installed and I am running across an error that did not appear during the beta program. If you go to the program group and go to the services directory item (http://localhost/ArcGIS/rest) you will get the following error:

Server Error in Application "DEFAULT WEB SITE/ARCGIS/REST"

HTTP Error 500.0 - Internal Server Error
There is a problem with the resource you are looking for, so it cannot be displayed.

Detailed Error InformationModule IsapiModule
Notification ExecuteRequestHandler
Handler ESRI-RestServices-ISAPI-2.0
Error Code 0x8007007f
Requested URL http://alpha:80/ArcGIS/rest
Physical Path c:\inetpub\wwwroot\ArcGIS\rest
Logon Method Anonymous
Logon User Anonymous


All other items seem to be working great (KML, WMS, Mobile, etc.) The only thing not working is the REST API. The only information I have found so far in the log is the following:

Log Entry : 7/7/2008 11:33:35 AM
ERROR:Object reference not set to an instance of an object. :: at ESRI.ArcGIS.REST.RequestHandler.ProcessRequest()
at ESRI.ArcGIS.REST.RestHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
http://localhost/ArcGIS/rest
-------------------------------


Any ideas?

Thanks,
Jim
 
  Jim Tochterman
VP, Research & Development
Bradshaw Consulting Services, Inc.
http://www.bcs-gis.com 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Dan Downing 
Date Aug 13, 2008 
Message I am also having this problem. Everything seems to be working properly, I just can't get to the services directory.

This is the error report I get:

HTTP Status 404 - /arcgis/rest/

type Status report
message /arcgis/rest/
description The requested resource (/arcgis/rest/) is not available.

Apache Tomcat/5.5.9 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Deona Evans 
Date Aug 21, 2008 
Message I'm having the same issue. Did anyone ever figure out what the problem is?
Thanks for any clues! 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Joshua DiLuciano 
Date Aug 25, 2008 
Message I'm having the same sort of issue, my KML and mapservices are running just fine.
I can not access the Rest portion of the server (admin, or the endpoints).
I've tried adding information to the rest.config file to match the documentation online.
(http://resources.esri.com/help/9.3/arcgisserver/apis/rest/index.html).
When I try to access my Rest admin page I get the
attached error.
(http://wud02417/ArcGIS/rest/admin)
 
 
Server Error in '/ArcGIS/rest' Application.
--------------------------------------------------------------------------------

Server Host cannot be null. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: ESRI.ArcGIS.ADF.Connection.ServerHostNullException: Server Host cannot be null.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[ServerHostNullException: Server Host cannot be null.]
   ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection.Connect(Boolean throwExceptionOnUnauthorizedAccess) +364
   ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection..ctor(String host, Identity identity, Boolean connect) +41
   ESRI.ArcGIS.REST.RestAppConfig.CheckSecuritySetting(HttpContext ctx) +81
   ESRI.ArcGIS.REST.RestAppConfig..ctor(HttpContext context) +58
   ESRI.ArcGIS.REST.RestUtils.GetRestAppConfig(HttpContext context) +76
   ESRI.ArcGIS.REST.RestModule.System.Web.IHttpModule.Init(HttpApplication app) +28
   System.Web.HttpApplication.InitModulesCommon() +66
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +814
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +243
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +106
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +340
 
 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Jim Tochterman 
Date Aug 25, 2008 
Message I found my solution working with ESRI Tech Support. It seems my default instance was not created correctly. To see if that is the case, use the AddInstance.exe application found in the ArcGIS\DotNet folder to create a new instance. If it works correctly, you can get rid of the one you just created and the original one that is not working and recreate it. 
  Jim Tochterman
VP, Research & Development
Bradshaw Consulting Services, Inc.
http://www.bcs-gis.com 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Joshua DiLuciano 
Date Aug 25, 2008 
Message Jim-
Thanks for the input. I ran the tool and created a new instance,
however I'm still having the same result with my flex application,
and the rest services are still not available from IE. I'll keep
looking into things and post my results. 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Deona Evans 
Date Aug 26, 2008 
Message I tried the same thing all to no avail. I still can't acces the rest services. This is frustrating! 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Joshua DiLuciano 
Date Sep 03, 2008 
Message I talked to an analyst today and was able to get my issued resolved. We did two things.

First went to the computer users and groups and deleted the ArcGISServices Account.

Went to the Web Applications Post Install and ran through the utility again.

Went back to computer users and groups and added the ArcGISWebServices account to the groups Adminstrators and AGSAdmin 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Clint Garrison 
Date Sep 15, 2008 
Message I am getting the same error. Everything worked up until last friday. I don't know what happened. The Arcgis/rest/services doesn't exist anymore. Please HELP!!!!!!!!!!!!!!! I re-booted, added a new service,(even deleted it)
I don't think IE or Firefox updated without me knowing it, but SOMETHING HAPPENED.
java edition so I don't know if the dotnet exe mentioned above will work
Clint 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Clint Garrison 
Date Sep 15, 2008 
Message YESSSSSSSSSSS
I did the post install again and it created the rest/services folders (I'm assuming)
So, somehow it was deleted. That was the http error. How could it get deleted?
anyway try the postinstall everyone 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Mark Greninger 
Date Oct 14, 2008 
Message This one was killing me too - thanks for pointing me in the right direction. I wanted to follow up and perhaps give a bit more detail and information for those who follow me.

For many of us (I assume, since it happened to me) - the ArcGIS Post install puts the "ArcGIS" folder in the wrong location - NOT under the root directory - for me it is D:\Website\Internet.

Instead I found that the Post Install AND the AddInstance (the most useful little program I have found) put the ArcGIS folder under D:\

WHAT the ...!!! I finally solved this problem (see below)

Anyway - You NEED to run the AddInstance (at least I did) since in Windows 2K3 I cannot set the applications correctly directly in IIS.

THEN - folks on the forum suggested copying the ArcGIS directory from the \DotNet\VirtualRootDir into the root directory for IIS and then manually re-pointing to this physical location in IIS.

THIS is what appears to have caused the problem. The AddInstance adds entries to the name of the server so the rest services will work.

See the code snippet for before and after. This was the "rest.config" under the \rest directory.

SO - what the best way to deal with this is:

1) Use the "AddInstance" command to remove existing instances (you can probably use Post-Install too).
2) Copy the "ArcGIS" directory (wherever you find it) to the root of your IIS website (c:\inetpub\wwwroot or D:\Website\Internet)
3) In IIS - Find the "ArcGIS" folder.
4) For each of the Applications (Manager, kml, etc) you will need to go into "properties" and browse the local path to point to the physical location of the directory.

This should get it to work! 
 
INCORRECT rest.config file - NO SERVER:

<GISServer>
    <ServerName></ServerName>
    <SoapUrl></SoapUrl>
    <SoapSslUrl></SoapSslUrl>
    <Identity>
      <EncodedString></EncodedString>
    </Identity>    
  </GISServer>

CORRECT - with server:

  <GISServer>
    <ServerName>GISINTRA2</ServerName>
    <SoapUrl>http://GISINTRA2/ArcGIS/services</SoapUrl>
    <SoapSslUrl>https://GISINTRA2:443/ArcGIS/services</SoapSslUrl>
    <Identity>
      <EncodedString>f8LkonWzJ0sHHuO9t2vYMWIMrXCx2GkJ5vE2vEZQ2DQ=</EncodedString>
    </Identity>
  </GISServer>

 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Deona Evans 
Date Nov 14, 2008 
Message So what if you've tried all these tricks and you still have the problem? Any other suggestions? This is very frustrating and time consuming for something that should already work.
Thanks,
Deona 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Atley Davidson 
Date Nov 14, 2008 
Message You are not alone. Very very frustrating. How can ESRI have released a product that isn't installing in the correct directory. I had to jump through hoops just to get manager up and running, now the service directory isn't setup. Does anyone know how to get the value? 
  Atley Davidson
Hamilton County GIS 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Atley Davidson 
Date Nov 14, 2008 
Message The last line should have been....Does anyone know how to get the EncodedString value? 
  Atley Davidson
Hamilton County GIS 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Atley Davidson 
Date Nov 14, 2008 
Message So I found a workaround simular to Mark's suggestion.

1) Use the "AddInstance.exe" to add another instance.
2) Run the Web Applications Post Install on the new instance.
3) copy the rest.config from the location of the new instance(was c:\"instance name" for me) to c:\inetpub\wwwroot\ArcGIS\rest folder
4) restart IIS


I hope this works for you. 
  Atley Davidson
Hamilton County GIS 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Bill MacPherson 
Date Dec 09, 2008 
Message This shortcut worked for me:

1. Copied the server, soap and encodedString parameters from my services.config file.
2. Pasted them into my rest.config file.
3. Restarted IIS

Now I can see my services!

This was a most helpful thread.
Thanks everyone. 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Gregory Michael 
Date Mar 11, 2009 
Message Thanks Atley...I sort of followed your work around and got it to work.

My issue: We had been using ArcGIS 9.3 REST API for about two months and then all of a sudden the REST services were not working. I went to go run the 'Web Applications Post Install' and I kept getting an error saying "Please enter a valid instance name and port number". But my default ArcGIS instance was there??

My fix:
1. Delete the ArcGISWebServices local account
2. Run C:\Program Files\ArcGIS\DotNet\AddInstance.exe. If you already have an ArcGIS instance (mine was at C:\Inetpub\wwwroot\ArcGIS) it will complain so you have to give it a new name like ArcGIS2. For some reason it created this new instance at C:\ArcGIS2.
3. Copy C:\ArcGIS2\rest\rest.config over the C:\Inetpub\wwwroot\ArcGIS\rest\rest.config (back up original rest.config just in case you need to set it back).
4. In rest.config, do a find/replace and rename ArcGIS2 to ArcGIS.
5. In rest.config, grab the value for the EncodedString parameter. Paste this value into the EncodedString parameter in the services.config file which is usually located at C:\Inetpub\wwwroot\ArcGIS\Services.
6. Run AddInstance.exe again and then modify/remove the ArcGIS2 instance
7. The ArcGISWebServices account should be in the agsadmin group and I believe the add instance tool does this for you.

FYI - I did not use the 'Web Applications Post Install'. I did when originally installing server but not to fix this issue I was having.

Greg
US Army
 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Matthew Malinowski 
Date May 04, 2009 
Message FYI to anyone reading this thread. I just tested this method and it worked perfectly.

- Matt 
  Matthew Malinowski
Sr. GIS Analyst
Ecology & Environment, Inc. 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author Aaron Weier 
Date Jul 07, 2009 
Message this did it for me too! thanks for sharing your hard work, saved me a lot of frustration, very much appreciated!

Aaron 
   
Report Inappropriate Content • Top • Print • Reply    
Subject Re: Installation Problem 
Author kai wang 
Date Aug 12, 2009 
Message I have a method---edit you rest.config
 
 
<GISServer>
    <ServerName>{hostname}</ServerName>
    <SoapUrl>http://{hostname}/arcgis/services</SoapUrl>
    <SoapSslUrl>https://{hostname}:443/arcgis/services</SoapSslUrl>
    <Identity>
      <EncodedString>{yourstring}</EncodedString>
    </Identity>
  </GISServer>