Subject: SQL Server does not exist or access denied
Posted By: sss22 Post Date: 1/9/2006 3:35:27 PM
Hi everyone,
this isnt the first time i install ASP.NET (2003) and SQL Server (2000) on a PC however i always suffer a lot at the beginning cz it never works from the first time.
This time I made sure (or at least i believe so) that I installed the two software correctly however i still get this error page whenever i try to connect to my SQL Database through my ASP.NEt (c#) coded web page:
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 100:
Line 101:            int result = 0;
Line 102:            dbConnection.Open();
Line 103:            try
Line 104:            {
 

Source File: C:\Inetpub\wwwroot\WYW\Login.aspx.cs    Line: 102

Stack Trace:


[SqlException: SQL Server does not exist or access denied.]
   System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
   System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
   System.Data.SqlClient.SqlConnection.Open() +384
   WYW.WebForm1.ValidateUser(String userName, String pass) in C:\Inetpub\wwwroot\WYW\Login.aspx.cs:102
   WYW.WebForm1.Button1_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\WYW\Login.aspx.cs:127
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1277

 
I made sure that the user name and password and database name and data source are all correct in my configuration of connection string in web.config but still I get this error. Can someone gimme some advice on what to check thanks a lot?

Regards,
Susan


Reply By: rstelma Reply Date: 1/9/2006 7:30:55 PM
Can you post your code here? Its awfully hard to troubleshoot something you can't see.

Reply By: David_the_DBA Reply Date: 1/9/2006 9:47:06 PM
Ensure that the SQL Service is running
Connect to it using Query Analyzer (from the Web Server -- or is it all on the same box) using the same credentials as are in your connection string
Ensure that your network libraries are installed and in place (Server Network Library Utility)

David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com

Go to topic 38505

Return to index page 399
Return to index page 398
Return to index page 397
Return to index page 396
Return to index page 395
Return to index page 394
Return to index page 393
Return to index page 392
Return to index page 391
Return to index page 390