While working with an ASP.NET MVC application I encountered following exceptions:
Exception clearly says that user instance login flag is not allowed when connecting to a SQL Server instance. For sure this error is related to SQL Server instance I am working on in this particular application. I examined the connection string in the web.config file.
There are two important points about this connection string:
- It points to local SQL Server database.
- User Instance is set to true
All local database runs under user instance and hence they don’t allow to configure user instance value in the web.config file. Removing User Instance entry should solve this problem. I modified connection string as follows:
And changing this resolved the issue. Hope it helps.
Leave a Reply