Freigeben über


Calculator Service Source Code

By request, see the attached file for an early look at the source code for the Calculator Service as a Visual Studio 2010 project.

This is a work in progress. Some features are not yet implemented, and I haven’t yet explained some of the implemented features. Use at your own risk, no warranties implied, etc.

Note that I’ve found that an iisreset is usually required after retracting and before re-deploying the solution.

Enjoy!

CalculatorService.zip

Comments

  • Anonymous
    June 10, 2010
    Thanks

  • Anonymous
    July 22, 2010
    Hi. How to deploy this service to SharePoint server? I used "Deploy" option from project context menu in VS 2010, but it deosn't work

  • Anonymous
    July 23, 2010
    Hi Przemek, Make sure you've set the Site URL property for the project (I use the URL of the SharePoint Central Administration site). Also, I found that an iisreset is a good idea before deploying the project. If deployment is successful, you should see the "Calculator Service" feature in the "Manage Farm Features" page in the central admin site. -David

  • Anonymous
    July 25, 2010
    The comment has been removed

  • Anonymous
    July 25, 2010
    Hi David It works! I forgot to start service in "Central Administration -> System settings -> Services on Server". Sorry for disturbing you:)

  • Przemek
  • Anonymous
    July 26, 2010
    Hi Przemek, Glad to hear it works! Starting the service instance is not an obvious step, so thanks for the feedback. -David

  • Anonymous
    April 11, 2011
    Thanks for the code sample!  The package's Deployment Server Type is set to WebFrontEnd.  This seems to create the service on the WFEs in the farm but not the application servers.  When we change the Deployment Server Type to ApplicationServer, the feature doesn't seem to get activated, in fact it doesn't show up in the list of farm features (even though the the solution is listed in Farm Solutions).  Please advise if there is something we may be doing incorrectly or if there are additional steps that need to be done to get the service available on the application servers.

  • Anonymous
    January 13, 2012
    When deploying the solution I get the following error, Error occurred in deployment step Add Solution: CalculatorService.CalculatorServiceInstance cannot be deserialized because it does not have a public default constructor... Any ideas?

  • Anonymous
    April 18, 2012
    Adam, because this object is serialized and stored in the SharePoint configuration database, it must have a public default constructor. Double-check that CalculatorServiceInstance.cs contains the "public CalculatorServiceInstance() { }" constructor.