Thursday, October 31, 2013

The Web application at "" could not be found in WCF with SharePoint server object model

Problem Background

I was creating a WCF in Visual Studio 2012 using C# as the programming language and when I call SharePoint server object model in the WCF there was an exception saying The Web application at "" could not be found.


Solution Background

Its because IIS hosted WCF sites use ApplicationPoolIdentity as its user. This is not authorized to SharePoint farm. So we have to give farm administrators credential in order to access SharePoint server.

Solution

  • Open IIS 
  • Go to "Application Pools" 
  • Click on your WCF Service site 
  • Click on "Advanced Setting"




  • Click the corner "Identity" under Process Model in order to change the identity

  • Select "Custom account" and click "Set"



  • There give your farm administrator user name and password.

No comments:

Post a Comment