execute-as

SQL 'Execute As' Login Command and Linq to SQL

I am trying to execute a sql query as another login using the 'Execute As' command. I am using Linq to SQL, so I've generated a Data Context class and I am using the ExecuteQuery method to run the 'Execute As' SQL command. I then call a Linq to SQL command that is successful. However, every subsequent query fails with the following err...

Switching execution context inside logon trigger

I have a database called MyDB in a Microsoft SQL Server 2008 Express instance using mixed mode authentication. The application using the database MyDB currently connects using Windows Authentication, using the current user's Windows credentials. This login is a member of the 'public' server role, and has a user mapped to it in the MyDB d...