|
-
May 24th, 2011, 01:10 AM
#1
configurationmanager.connection string giving System.NullReferenceException was unhan
Dear Sir,
I am in great trouble, I have a project on visual studio 2008 and I getting connectionstring using ConfigurationManager.ConnectionStrings("connestionstring").ConnectionString. this project have a app.config file which contain
/code
<connectionStrings>
<add name="RMINVENTORY" connectionString="Server=localhist;Initial Catalog=Northwind;Integrated Security=SSPI" />
</connectionStrings
I get the connection using str variable like this
dim str as string
str=ConfigurationManager.ConnectionStrings("RMINVENTORY").ConnectionString
code/
In visual 2008 it works perfectly, but in 2010 it giving the error like this
"System.NullReferenceException was unhandled
Message=Object reference not set to an instance of an object.
Source=Inventory.Metadata"
Please help where is the problem
Thanking You
Debasis Bag
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|