I couldn't figure out what is the problem for this exception.
The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception
First attempt: I was using the WCF Service to make some small application. It works just fine and I can use the LINQ properly. After 2 or 3 days. Maybe after I close Visual studio and load the project again. The exception appear.
The 2nd attempt also the same. I create another project and it work just fine until I do something else (I do not change any code)
SQL Server working fine and I can connect through SQL Management Studio without problem.
A click at Debug error lead me to the connection string from linq file.
What could be the problem? I tried to search but couldn't find the answer to resolve this.
Thank you
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…