Select to view content in your preferred language

Using ArcObjects in a WCF Method called in a Windows Service

891
1
11-26-2012 01:45 PM
SamuelHenderson
Deactivated User
Hello everyone 🙂

How do I add ArcGIS License Checking to a Windows Service?  When I go to Project->Add ArcGIS License Checking and specify the desired licenses to check for the Windows Service fails to start with the following error: [ATTACH=CONFIG]19537[/ATTACH]

Removing the ArcGIS License checking allows the service to start and run, but then I run into problems elsewhere...

Once running the Windows Service basically sits and waits for a remote request to come from a webserver and when it receives this request it launches a WCF class that contains the actual ArcObject code needed to generate a shapefile (it connects to an ArcSDE workspace ... all that fun stuff).  The problem is that without having the ArcGIS license checking my ArcObjects code generates a COM Exception of 0x80040111 which is of course the exception you get when you try to run ArcObjects without having initialized a license.

I thought about trying to add the ArcGIS License Checking to the WCF Class, but that class has no Sub Main().

What should I be doing?
0 Kudos
1 Reply
TimSexton1
Frequent Contributor
I'm trying to do the same thing.  Did you ever get this working?

Thanks!


[Edit] -- My main issue was building a WCF service with 32bit ArcObjects as dependencies on a 64 bit machine.  I had to use this command "corflags /32BIT+ /FORCE WcfSvcHost.exe" to allow the WcfSvcHost to debug in 32bit mode.
0 Kudos