1

I have ArcObjects .NET code that is running on a machine with ArcGIS for Server 10.1.

The application worked on the dev server. But when I moved to Test server, I am not able to initialize the licenses.

This is the code I am using

RuntimeManager.Bind(ProductCode.Server);
bool succes = false;
AoInitialize arcObjectInitEnv = new AoInitializeClass();
if (arcObjectInitEnv.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeStandard) == esriLicenseStatus.esriLicenseAvailable)
{
 status = arcObjectInitEnv.Initialize(licenseCode);
}
else
{
 throw exception(...);
}

I am sure I authorized the server right. and I am able to run ArcGIS server manager. And test the services and they are working fine.

I compile as "Any Cpu" , which is the same I used for Dev. Is there tool that give me "availablity" for server, like desktop? I didn't install ArcObjects SDK on the test server, because I assume it is not required there. Is that true?

How can I troubleshoot this?

asked Mar 4, 2013 at 19:29
2
  • Did you try changing esriLicenseProductCodeArcStandard to esriLicenseProductCodeArcServer? Commented Mar 4, 2013 at 20:45
  • 1
    Shoud you compile it in x86? due it is ArcObjects Commented Sep 18, 2013 at 15:20

1 Answer 1

1

Try to use the function

RunRuntimeManager.BindLicense(ProductCode.Server);

then get rid of the code related to AoInitialize arcObjectInitEnv = new AoInitializeClass();

this funtion can be used if you are not going to use any extension.

answered Sep 18, 2013 at 15:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.