web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

System.Data.SqlClient.SqlException: Setuser failed because of one of the following reasons: the database principal does not exist, its corresponding server principal does not have server access, this type of database principal...

Nishant Rana Profile Picture Nishant Rana 11,325 Microsoft Employee

We got this error while executing our plugin. Within plugin we were making sql call to fileteredViews.

For impersonation we were making use of SETUSER keyword.

The plugin was working fine in development and test server. But started giving the error in case of Production.

We replaced SETUSER with EXECUTE AS USER and everything was fine than.

http://blogs.msdn.com/crm/archive/2007/05/21/writing-crm-callouts-with-filtered-views.aspx

Bye…


Posted in Microsoft Dynamics CRM Tagged: CRM

This was originally posted here.

Comments

*This post is locked for comments