InvalidOperationException is thrown by EF4 Code-First.

c# code-first database ef-code-first entity-framework

Accepted Answer

Although it's too late for a response, this article is highly searched on Google, so it could still be helpful. The issue is a lack of credentials. You must modify your connection string to contain the following to avoid this:

Trusted_Connection=False;Persist Security Info=True

according to this piece

49
3/28/2011 11:09:14 PM

Popular Answer

I am sharing my reply in response to your request.

The Trusted Connection and Persist Security Information need adjustment, and my solution was quite similar to bizon's. However, I was able to do it using visual studio properties by navigating to:

Zzz-11 to Zzz-16 to Zzz-20 to Zzz Once both Persist Security Information and TrustServerCertificate were checked as True, the connection string was appropriately formed.

screenshot of visual studio gui



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow