Invoking custom WCF service from under Sharepoint 2010 throws an Impersonation error from SQL

I had a problem with one of my WCF services that was running under Sharepoint 2010. The problem was that when that service tries to access the database to add a record, i got the below exception.

System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 – Either a required impersonation level was not provided, or the provided impersonation level is invalid.)

It was very weird for me because my connection string was configured to use SQL authentication. So I do not understand why is it trying to impersonate.

Anyways, I have done a simple workaround to overcome that problem. I simply disabled the shared memory provider from the SQL configuration manager.

 

That way I forced it to work via named pipes. And it worked :). Still I do not know understand what was the problem originally, however, it worked.

Advertisements

One Response to Invoking custom WCF service from under Sharepoint 2010 throws an Impersonation error from SQL

  1. Laffi says:

    Thanks, you saved me.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: