c# - Object reference not set to an instance of an object.

Posted by tom on Stack Overflow See other posts from Stack Overflow or by tom
Published on 2010-03-22T11:18:38Z Indexed on 2010/03/22 11:21 UTC
Read the original article Hit count: 265

Filed under:
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.

© Stack Overflow or respective owner

Related posts about c#