Thank you for providing the exact error message. That helps us help you. However you did not tell us what line the error is occurring. It helps to also provide that.
I will assume that the exception is occurring on the SqlConnection.Open call. Look at the SqlConnection.Open Method documentation. It says that an InvalidOperationException can occur if there is not a data source or server. So if the error is occurring there then there is a problem with your ConnectionString. Something I might do is to change the SqlConnection constructor to something such as:
string s = ConfigurationManager.ConnectionStrings["conn"].ToString();
SqlConnection conn = new SqlConnection(s);
conn.Open();
And then in the debugger I can look at what the string actually is. My guess is that it is empty. Do you know how to use breakpoints?