ASP Snippets

Categories






Alerts

Free Alerts

Your email will always be
private and will not be shared.




Follow us on twitter.




Zoom In | Zoom Out


Author is awarded Most Valuable Professional award by Microsoft ASP/ASP.Net

Exception - The ConnectionString property has not been initialized

Author:Mudassar Khan

Server Error in '/.Net' Application.


The ConnectionString property has not been initialized.

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.InvalidOperationException: The ConnectionString property has not been initialized.

 

Cause

The ConnectionString property of SqlConnection object is not set or it is invalid.

 

Solution

1. Check you are assigning value to SqlConnection Object or not. For more information you can visit my article Parameterized Queries ADO.Net. I have explained how to get connection string from web.config

2. If connection string is coming from web.config check the key name is correct.

3. If the variable is used it is not reset somewhere

Posted: May 21 2009, 23:10 by Mudassar Khan | Comments (1) RSS comment feed |
Views: 2548
Page copy protected against web site content infringement by Copyscape


If you like this article, help us grow by bookmarking this page on any social bookmarking site.
Bookmark and Share





Comments

Add comment


 

biuquote
  • Comment
  • Preview
Loading




0  +  0  =   










Community News





Web Hosting SpotLight


Consulting


For consulting and work related queries click here.



Advertise


Advertise with us. For more details click here.


Suggestions


Please provide your valuable suggesstions here.

This Site is hosted on

Lunarpages.com Web Hosting