Unable to bind the Server 10.1 Licences to WCF

Discussion created by Shrey on Jan 27, 2013
Latest reply on Feb 17, 2013 by rlwatson

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

                //Initialize ESRI license
                ESRI.ArcGIS.esriSystem.IAoInitialize aoIinitialize = new ESRI.ArcGIS.esriSystem.AoInitialize();
                if (aoIinitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer) == esriLicenseStatus.esriLicenseAvailable)

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