06/04/2015

WCF With Sharepoint

When using WCF and need to connect with the sharepoint you must do the following:

1- in web.config: Modify aspNetCompatibilityEnabled from false to true.

2- in main service you could add the below:
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

EX:
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class TestService : ITestService
    {
    }

No comments:

Post a Comment