Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SQL Server does not exist or access denied

Author  Topic 

Raquel
Starting Member

1 Post

Posted - 2004-09-27 : 01:30:49
Hello everyone,

I've created a simple web application using ASP.NET (C#) to connect to a remote computer hosting SQL Server 2000 database to get my data. I keep getting "SQL Server does not exist or access denied" error. I tried using the data objects that came with VS (sqlconnection, dataadapter and dataset), that didn't work so I created another project, this time using my own lines of code (declaring connections, adapter and dataset and connecting them to each other), didn't work either.

So I tried a different approach and created a Windows application this time but still connecting to the same database, etc. Worked like a charm! Does anybody know how I could make my web application work as well? I'm using the following connection string and I could query the database fine using Enterprise Manager and Query Analyzer.

data source=DTRP;user id=aspnet;network library=dbmssocn;password=;initial catalog=Dissolve;packet size=4096;persist security info=True;workstation id=MYXP

Been trying to solve this problem for nearly a week now so any ideas would be much appreciated.

---------------------------------------------------------------------
Server Error in '/WebApplication4' Application.
--------------------------------------------------------------------------------

SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.

Source Error:

Line 36: // Put user code to initialize the page here
Line 37: // sqlConnection1.Open();
Line 38: sqlDataAdapter1.Fill(dataSet11, "Users2");
Line 39: // sqlConnection1.Close();
Line 40: // Response.Write(Request.ServerVariables["LOGON_USER"]);

Source File: c:\inetpub\wwwroot\webapplication4\webform1.aspx.cs Line: 38

Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
WebApplication4.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapplication4\webform1.aspx.cs:38
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Kristen
Test

22859 Posts

Posted - 2004-09-27 : 02:13:51
Dunno if this helps, but ther eis useful connection info at
http://www.able-consulting.com/ADO_Conn.htm

an in partiuclar, for ASP.NET,
http://www.able-consulting.com/dotnet/adonet/Data_Providers.htm#SQLClientManagedProvider

Kristen
Go to Top of Page
   

- Advertisement -