SOS: SQL Server not found or Access Denied

H

Hermit Dave

Hi,
I am getting this SQLException: Sql Server does not exist or access denied

Here is the situation:
Build machine: VS 2003, Framework 1.1, Windows XP and SQL Server
I have two sets of connection strings, one for local sql server and one for
internet sql server.
Both connect to the database perfect when i connect through the ASP.NET
pages on my local IIS

The moment i copy relevant code to the hosting site, using internet Sql
Server gives me the above error

The connection string for internet server (which works fine when connecting
from local IIS)
<add key="ashandrodesConnect" value="Data Source=208.170.aaa.xxx;Network
Library=DBMSSOCN;Initial Catalog=mydatabase;User
ID=mysqluser;Password=mysqlpass;" />

i also tried the variation with Data Source=XXX.XXX.XXX.XXX,1433 for
explicit TCP/IP communication but still the same

Any help will be greatly appreciated
Attaching stack info - might be helpful
Stack Trace:

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +474

System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
WebShop._default.AddEarlyBird(String Name, String Email, String ShoeSize)
+373
WebShop._default.lnkInformMe_Click(Object sender, EventArgs e) +161
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +108

System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1277
 
M

Miha Markic

Hi Hermit,

Try creating an udl file with similar connection string (provider should be
added) and test connection on it or
you might create a simple winform app just for testing purposes.
This will tell you it the problem lies within aspnet account or not.
 
H

Hermit Dave

Hi Miha,
I did try using a udl file on my dev machine and it connects to the server
fine. Even the asp.net pages on local machine connect to the database
perfect.
Its just that when i use the same on server it starts going bonkers. Couldnt
set the server to debug mode last night.
Thought there could be a potential ip visibility problem but the odbc
connnection on server connects to the db like a treat.



Miha Markic said:
Hi Hermit,

Try creating an udl file with similar connection string (provider should be
added) and test connection on it or
you might create a simple winform app just for testing purposes.
This will tell you it the problem lies within aspnet account or not.

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com

Hermit Dave said:
Hi,
I am getting this SQLException: Sql Server does not exist or access denied

Here is the situation:
Build machine: VS 2003, Framework 1.1, Windows XP and SQL Server
I have two sets of connection strings, one for local sql server and one for
internet sql server.
Both connect to the database perfect when i connect through the ASP.NET
pages on my local IIS

The moment i copy relevant code to the hosting site, using internet Sql
Server gives me the above error

The connection string for internet server (which works fine when connecting
from local IIS)
<add key="ashandrodesConnect" value="Data Source=208.170.aaa.xxx;Network
Library=DBMSSOCN;Initial Catalog=mydatabase;User
ID=mysqluser;Password=mysqlpass;" />

i also tried the variation with Data Source=XXX.XXX.XXX.XXX,1433 for
explicit TCP/IP communication but still the same

Any help will be greatly appreciated
Attaching stack info - might be helpful
Stack Trace:

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
WebShop._default.AddEarlyBird(String Name, String Email, String ShoeSize)
+373
WebShop._default.lnkInformMe_Click(Object sender, EventArgs e) +161
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1277
 
H

Hermit Dave

Thanks Miha,
I did raise a log and they gave me an internal ip. Firewalled.


Miha Markic said:
Hi Hermit,

Try creating an udl file with similar connection string (provider should be
added) and test connection on it or
you might create a simple winform app just for testing purposes.
This will tell you it the problem lies within aspnet account or not.

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com

Hermit Dave said:
Hi,
I am getting this SQLException: Sql Server does not exist or access denied

Here is the situation:
Build machine: VS 2003, Framework 1.1, Windows XP and SQL Server
I have two sets of connection strings, one for local sql server and one for
internet sql server.
Both connect to the database perfect when i connect through the ASP.NET
pages on my local IIS

The moment i copy relevant code to the hosting site, using internet Sql
Server gives me the above error

The connection string for internet server (which works fine when connecting
from local IIS)
<add key="ashandrodesConnect" value="Data Source=208.170.aaa.xxx;Network
Library=DBMSSOCN;Initial Catalog=mydatabase;User
ID=mysqluser;Password=mysqlpass;" />

i also tried the variation with Data Source=XXX.XXX.XXX.XXX,1433 for
explicit TCP/IP communication but still the same

Any help will be greatly appreciated
Attaching stack info - might be helpful
Stack Trace:

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
WebShop._default.AddEarlyBird(String Name, String Email, String ShoeSize)
+373
WebShop._default.lnkInformMe_Click(Object sender, EventArgs e) +161
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1277
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top