c# - Object reference not set to an instance of an object.
- by tom
Line 30: sUsername.Trim();
Line 31: sPassword.Trim();
Line 32: string ConnectionString = WebConfigurationManager.ConnectionStrings["dbnameConnectionString"].ConnectionString;
Line 33: SqlConnection myConnection = new SqlConnection(ConnectionString);
Line 34: try
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Any ideas? I don't understand the error.