Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

GISServerConnection gisServerConnection = new GISServerConnection();
gisServerConnection.Connect("localhost");

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.