asp.net - cannot connect to sql database on shared server -


i have purchased website installed on dedicated server. have moved arvixe , able restore database on 1 of shared servers. able connect server sql studio management studio 2008 using domain name (www.mydomain.com) , username , password of database account setup in arvixe control panel. however, not able connect database application. able see pages of site not use database. application using .net 3.5 have set server .net 2.0 classic iis. have done lots of searching on web , have read through many forums. have tried every possible option connection strings in web.config , still receive same error:

server error in '/' application.

a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: sql network interfaces, error: 26 - error locating server/instance specified) description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.

exception details: system.data.sqlclient.sqlexception: network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: sql network interfaces, error: 26 - error locating server/instance specified)

source error:

an unhandled exception generated during execution of current web request. information regarding origin , location of exception can identified using exception stack trace below.

stack trace:

[sqlexception (0x80131904): network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: sql network interfaces, error: 26 - error locating server/instance specified)]    system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception, boolean breakconnection) +4849719    system.data.sqlclient.tdsparser.throwexceptionandwarning(tdsparserstateobject stateobj) +194    system.data.sqlclient.tdsparser.connect(serverinfo serverinfo, sqlinternalconnectiontds connhandler, boolean ignoresniopentimeout, int64 timerexpire, boolean encrypt, boolean trustservercert, boolean integratedsecurity, sqlconnection owningobject) +4863021    system.data.sqlclient.sqlinternalconnectiontds.attemptonelogin(serverinfo serverinfo, string newpassword, boolean ignoresniopentimeout, int64 timerexpire, sqlconnection owningobject) +90    system.data.sqlclient.sqlinternalconnectiontds.loginnofailover(string host, string newpassword, boolean redirecteduserinstance, sqlconnection owningobject, sqlconnectionstring connectionoptions, int64 timerstart) +376    system.data.sqlclient.sqlinternalconnectiontds.openloginenlist(sqlconnection owningobject, sqlconnectionstring connectionoptions, string newpassword, boolean redirecteduserinstance) +221    system.data.sqlclient.sqlinternalconnectiontds..ctor(dbconnectionpoolidentity identity, sqlconnectionstring connectionoptions, object providerinfo, string newpassword, sqlconnection owningobject, boolean redirecteduserinstance) +189    system.data.sqlclient.sqlconnectionfactory.createconnection(dbconnectionoptions options, object poolgroupproviderinfo, dbconnectionpool pool, dbconnection owningconnection) +185    system.data.providerbase.dbconnectionfactory.createpooledconnection(dbconnection owningconnection, dbconnectionpool pool, dbconnectionoptions options) +31    system.data.providerbase.dbconnectionpool.createobject(dbconnection owningobject) +433    system.data.providerbase.dbconnectionpool.usercreaterequest(dbconnection owningobject) +66    system.data.providerbase.dbconnectionpool.getconnection(dbconnection owningobject) +499    system.data.providerbase.dbconnectionfactory.getconnection(dbconnection owningconnection) +65    system.data.providerbase.dbconnectionclosed.openconnection(dbconnection outerconnection, dbconnectionfactory connectionfactory) +117    system.data.sqlclient.sqlconnection.open() +122       system.web.util.callihelper.eventargfunctioncaller(intptr fp, object o, object t, eventargs e) +14    system.web.util.callieventhandlerdelegateproxy.callback(object sender, eventargs e) +35    system.web.ui.control.onload(eventargs e) +99    system.web.ui.control.loadrecursive() +50    system.web.ui.page.processrequestmain(boolean includestagesbeforeasyncpoint, boolean includestagesafterasyncpoint) +627 

version information: microsoft .net framework version:2.0.50727.4223; asp.net version:2.0.50727.4223

right connection strings in following format in web.config. have 1 appsettings , 1 connectionstrings , have added info applicationsetting.cs:

          <appsettings>           <add key="connstringwebsite" value="server=www.mydomain.com;database=mydatabase;uid=xxxxx;pwd=xxxxx"/>           <appsettings/>           <connectionstrings>           <add name="fantasyactionconnectionstring" connectionstring="server=www.mydomain.com;database=mydatabase;uid=xxxxx;pwd=xxxxx"/>           <connectionstrings/> 

applicationsettings.cs

//connection string                 private const string _connserver = @"www.mydomain.com";                 private const string _conndatabase = "mydatabase";                 private const string _connuserid = @"xxxxxx";                 private const string _connpassword = "xxxxxx"; 


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -