SqlConnection

  • Thread starter Arun S via .NET 247
  • Start date
A

Arun S via .NET 247

When i use the SqlConnection class to establish a connection to asql server, i get the following error. But when i verify theconnection using a .udl file, it succeeds. Further it also worksthrough an .asp file (Server.CreateObject("ADODB.Connection"))!!!

[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
test.WebForm1.Page_Load(Object sender, EventArgs e) inc:\inetpub\wwwroot\test\webform1.aspx.cs:44
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Any idea ?!?!
 
P

Patrick

Your connection strings must be different, maybe the sqlconn is not using
the same security setting?

When i use the SqlConnection class to establish a connection to a sql
server, i get the following error. But when i verify the connection using a
..udl file, it succeeds. Further it also works through an .asp file
(Server.CreateObject("ADODB.Connection")) !!!

[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
test.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\test\webform1.aspx.cs:44
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

Any idea ?!?!
 

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