dcinadr
dcinadr

Reputation: 685

Windows service won't start with framework needed for Share Point

I have a windows service that opens a WCF endpoint for client connections. This service also references SharePoint libraries to use the client object model. When I used the Share Point library my build failed because it said it couldn't find the SharePoint reference when it was clearly there. To fix this I learned that I had to change the frame work from ".NET Framework 4 Client Profile" to ".NET Framework 4".

The problem is when I try to start this service it fails abruptly with the "Error 1053: The service did not respond to the start or control request in a timely fashion."

When the framework is ".NET Framework 4 Client Profile" the service starts without problems.

Does anyone know what the problem is and how to fix it?

Update: I changed this app to a console app to see what was going on. As soon as the app starts up it says I need to install .net framework v4.0. I installed all of the possible frameworks and I still receive this error message. Any ideas?

Upvotes: 0

Views: 371

Answers (1)

David Culp
David Culp

Reputation: 5480

A few things to check.

First, the SharePoint client object model is 64-bit/.net 3.5 only, so make certain you are compiling as .net 3.5 and with either full 64-bit or any proccessor.

Second, there are 3 client object models for SharePoint; the normal client object model and two specialized for JavaScript and SilverLight respectively. The normal client object model can only be run on the SharePoint server -- not on a client machine, while the other two are generally used from within a browser (although are not strictly limited to such).

Third, in order to develop with the SharePoint Object Model (the standard one), an instance of SharePoint must be running on the development machine.

If any of these are are problem, you may need to address the problem by programming against the SharePoint web services instead of the object model.

Upvotes: 1

Related Questions