Below is my connection string:
connectionString=\"metadata=res://*/EDMX.Test.csdl|res://*/EDMX.Test.ssdl|res://*/EDMX.Test.msl;provider=System.Data.Sq
You've just done a restart of the service and the code should run without errors
I was facing the same error today, what I was doing wrong was that I was not adding Password tag in the connection string. As soon as I added the Password tag with correct password the error went away. Hope it helps someone.
We had connection string in web.config
with Data Source=localhost
, and there was this error (MSSQL was on the same machine). Changing it to actual `DOMAIN\MACHINE' helped, somewhy.
I had this error and it was caused by a typo in the connection string in App.config.
Possible solution is described in this Code Project tip:
As folks mentioned IIS user network service user credentials while trying to log in sql server. So just change the Application pool settings in your IIS:
- Open Internet Information Service Manager
- Click on Application Pools in left navigation tree.
- Select your version Pool. In my case, I am using ASP .Net v4.0. If you dont have this version, select DefaultAppPool.
- Right click on step 3, and select advanced settings.
- Select Identity in properties window and click the button to change the value.
- Select Local System in Built-in accounts combo box and click ok. That's it. Now run your application. Everything works well.
For me when that usually starts happening, I have to remote desktop into the service and at the minimum restart IIS. It usually starts popping up right after I deploy code. On a few rare occasions I have had to restart the SQL services and IIS. I wrote a batch script to take a param (1 or 2) and have it setup to either do a restart of IIS ( i.e. 1), or go full nuclear (i.e. 2).