I am getting the error 'Cannot execute as the database principal because the principal "kc" does not exist...' when I try to execute a Microsoft web application locally that connects to a SQL Server database. It application works fine when it is connecting to a remote server.
I copied the database on the remote server to my local computer to make changes. This is the connection string when connecting to the remote server:
<add name="Database" connectionString="Server=KC-DEV2;Database=ICKC;User Id=kc;Password=kc" providerName="System.Data.SqlClient" />
The owner of the database is 'KC\Administrator'. I use SQL Server Authentication.
The connection string when I am connected to the database locally is as follows:
<add name="Database" connectionString="Server=localhost;Database=ICKC;Trusted_Connection=Yes;" providerName="System.Data.SqlClient" />
I restored the remote database to my local computer. The owner of the ICKC database is KC\GSantin. I connect to the database using Windows Authentication.
From what I found on the web, this error can often be from no owner on the database but that is not the case for me. There is a login for 'kc' in the local database. It is a backup and restore of the remoste one so everything is the same.
Does anybody have any suggestions how I can fix this problem?
Thanks, Gloria