Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This code works fine on a development box, but fails in a server environment:

GISServerConnection gisServerConnection = new GISServerConnection();

The exception is this:

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at ESRI.ArcGIS.Server.IGISServerConnection.Connect(String machineName)

My best guess is that I need to add a user to the agsusers group. Our server (Server 2008 R2) uses IIS 7.5, so I tried adding the application pool identity ASP.NET v4.0 Classic to the group. This failed, so I tried adding IUSR to the group, which also failed.

What could I be doing wrong?

share|improve this question
up vote 1 down vote accepted

Group memberships don't take effect until the user logs out and back in. Can't really do that with an application pool identity, so I tried restarting the IIS service. That didn't help, so I rebooted the machine, which finally solved my problem.

share|improve this answer
I wonder if restarting the SOM would have worked. – Kirk Kuykendall Dec 2 '11 at 2:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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