cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

.net API in windows service Error running ConnectedThingClient config.

SOLVED
Highlighted
Participant

.net API in windows service Error running ConnectedThingClient config.

I am trying to get a .NET (C#) windows service running using the thingwork .net API.  Everything builds and the service installs.  On launch, the ConnectedThingClient constructor calling base fails on the TWAPI dll.  I have tried 'any cpu', x64 specific and x86 specific builds/installs and they result in either a bad configuration error from windows a 607 TWAPI error. 

 

Has anyone written/installed/run a windows service to interact with the TW platform through the TW .NET API?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: .net API in windows service Error running ConnectedThingClient config.

Got this traced all the way through and after pushing the whole application to x64 including twapi and libraries, it boiled down to a rights issue that twapi needs to create the offline message store in the deployment folder.  Granting rights to the folder and the log enabled the client to connect and reconnect with no issues. 

 

So issue resolved, TWAPI can be run through a windows service. 

1 REPLY 1

Re: .net API in windows service Error running ConnectedThingClient config.

Got this traced all the way through and after pushing the whole application to x64 including twapi and libraries, it boiled down to a rights issue that twapi needs to create the offline message store in the deployment folder.  Granting rights to the folder and the log enabled the client to connect and reconnect with no issues. 

 

So issue resolved, TWAPI can be run through a windows service.