Unable to bind the Server 10.1 Licences to WCF

2703
1
01-27-2013 09:55 PM
ShreyPrasad
New Contributor
Hello,

   I am using an WCF service in which I have written some arc object for Initializing the product code which is mentioned as below.

  ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server);
                //Initialize ESRI license
                ESRI.ArcGIS.esriSystem.IAoInitialize aoIinitialize = new ESRI.ArcGIS.esriSystem.AoInitialize();
                if (aoIinitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer) == esriLicenseStatus.esriLicenseAvailable)
                {
                    aoIinitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer);
                }

I am getting the not able to get the product code of the server . But if I am using the Desktop(Standard), product code I am able to get through the initialization phase  and able to execute the application. Please let me know where should I correct my code. The Framework for the application is 4.0. In IIS I a have  enable the 32-bit setting of application pool setting. Application pooled service has been set to  ArcGISServiceAppPool.

I am getting the following issue :ArcGIS product not specified.  You must first bind to an ArcGIS version prior to using any ArcGIS components
0 Kudos
1 Reply
RichardWatson
Frequent Contributor
10.1 Server is x64.  In order to Bind to a server license your host process must be 64 bit.

The easiest way to see and confirm this is to write a trivial Console application which does this.  First compile as it as x86 then compile it as AnyCPU (if the machine is x64) or just x64.
0 Kudos