How to read connection string from the hosted server(godaddy)?

Topics: Data Access Application Block, Enterprise Library Core, Exception Handling Application Block
Jan 7, 2011 at 6:27 AM
Edited Jan 7, 2011 at 6:47 AM

Hi All,

I have web application in which i am using enterprise libraries and layered architecture. Everything is working fine in my local system and our server. When we host the application in godaddy server, not able to read connectionstring from the hosted database. If i use the same database from hosted server in my local system or in our server it is working fine and am getting data from the hosted database. Object reference not set to instance of an object error i am getting. I tried with wrong connectionstring my local server, then i got the same error which i got in the hosted server.

I am using Microsoft Enterprise Library 4.

string _DATABASE_INSTANCE="connectionstringname"

connectionstringname is name of conection string in web.config

Thanks for any help.


Database db = DatabaseFactory.CreateDatabase(_DATABASE_INSTANCE);.

Near Database db i am getting the above error. Please help me regarding this

Jan 7, 2011 at 7:04 AM

It seems your inquiry is not really an EntLib question since it works on your local system and more of hosting in godaddy.  I suggest posting this in other  forums as I'm not familiar with it.


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.