Select to view content in your preferred language

Using ArcObjects in standard web service

4687
10
Jump to solution
11-21-2012 01:08 PM
XintaoLiu
Occasional Contributor II
Dear All,

I created a standard web service using C# VS 2010. The operating system is Windows 7 and IIS version is 7. I added ArcGIS references to the C# web service project and tried to do: IAoInitialize m_pAoInit = new AoInitialize(). It can be done. But when I tried: IPoint p = new PointClass();

Then I got the following error:
Retrieving the COM class factory for component with CLSID {00A5CB41-52DA-11D0-A8F2-00608C85EDE5} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).

Any suggestion? Thanks in advance!
0 Kudos
10 Replies
GlendaLopez
New Contributor
Thanks! Besides the settings in C# project and IIS, I also need to change license initialization codes as follows:

ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
IAoInitialize m_AOInit = new AoInitializeClass();
esriLicenseStatus  licenseStatus = m_AOInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer);

Then the whole thing begins to work!


Hi, Can you help me? i have the same issue, i created a web service, but not work, can you explain me, as resolved your issue? thnks, sorry my english, i not write very well.

best regards.
0 Kudos