Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Error running the GeoProcessor from a Windows Service (Network Service)

$
0
0
Hello,

I've created a simple Windows Service application in VC++, which all it does is call the GeoProcessor:

IGeoProcessorPtr ipGP(CLSID_GeoProcessor);
ipGP->SetEnvironmentValue(L"workspace",_variant_t(L"C:\\Temp\\MapsTemp\\GDT"));
IVariantArrayPtr ipValues(CLSID_VarArray);
ipValues->Add("C:\\Temp\\MapsTemp\\GDT");
ipValues->Add("mySERVgdb");
IGeoProcessorResultPtr ipResult;
ITrackCancelPtr trcl(CLSID_TrackCancel);
ipResult = ipGP->Execute(L"CreatePersonalGDB", ipValues, trcl);

If this service is run as the default 'Local Service' user then it works fine. However, when it is run as 'Network Service' it fails and crashes the service.

A red-x windows MSVC++ Debug Library dialog appears saying:
Debug Error!
Program: Myprogram.exe

R6010
- abort() has been called

(Press Retry to debug the application)
Abort, Retry, Fail

The service then stops, and the geodatabase is not created. I have put logging in and it works ok up to the GP->Execute.

The Network Service user has been given full permission on the folders in question.

This is something we have done in the past with 9.3 and it has worked fine, but doesn't seem to work in 10.

Any help would be appreciated.

thanks

Matt

Viewing all articles
Browse latest Browse all 1374

Trending Articles