Friday, October 25, 2013

System.InvalidOperationException While writing connection string

Error:- System.InvalidOperationException: Instance failure.
When i had this problem as i have provided a double \\ in connection string just check how you are providing the connection string in a config file i.e. Data Source=.\\SQLEXPRESS;" - It's the double \\. That's an escape sequence in C#.

if you found this issue on code behind file for avoiding you need to write your code like this @"\SQlEXPRESS"
hope it works for you now.

No comments:

Post a Comment