473,216 Members | 1,508 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

Error: SQL Server does not exist or access denied

Hi,

I am a new member. Hello to every one. I am new in ASP.NET area. I wrote an ASP.NET web application which was running ok with my old laptop. Currently I have given a new laptop. Now I copied my application to the new laptop and I am experiencing as SQL Server connection error: "SQL Server does not exist or access denied". Following is a simply ASP.NET application to test the connection and I am getting following error:

For your information I am using SQL Server 2000 and Microsoft Visual Studio .NET 2003 and ASP.NET Version:1.1.4322.2032 .
I can connection to the SQL Server using a DataLinks file.
Also I have copied an existing windows C# application from my old laptop where the SQL Server connection working fine.

Thank you for your help in advance.

Atia

************************************************** *************************************
Server Error in '/testsqlconn' 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 23:
Line 24: SqlConnection conn = new SqlConnection("UID=batch;PWD=bbatch;Initial Catalog=TEST;Data Source=NWHEXPRESS");
Line 25: conn.Open();
Line 26: conn.Close();
Line 27:


Source File: c:\inetpub\wwwroot\testsqlconn\testsqlconn.aspx.cs Line: 25

Stack Trace:


[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
testsqlconn.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\testsqlconn\testsqlconn.aspx.cs :25
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.2032; ASP.NET Version:1.1.4322.2032

************************************************** *********************
Sep 7 '06 #1
1 4147
[SqlException: SQL Server does not exist or access denied.]

There are a huge number of possibilities as to why you are getting this error.
Make sure your connection string is spelt correctly and if case sensitivity is on make sure the case matches etc.

More likely its a permissions thing. Look at what context the 'user' is attempting to connect to the Database from you ASP appplication you need to know who 'you' are in the context of a server page attampting access, does it have a corresponding user set up in SQL Server, does this user have the correct permissions etc, can you connect with a trusted connection etc., because it's unlikely its connecting as you.

As I say, difficult to diagnose from here, but start with the basics.

Hope this helps

P
Sep 8 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Marcos | last post by:
Yesterday afternoon I lost access to my local MSDE 2000 sp3(a?) instance. Usinig NT or SQL authentication I get an 'access denied' error when I try to connect. This happened suddenly with no...
3
by: Matthew Louden | last post by:
I attempt to connect ASP.NET application with SQL Server using ADO.NET. I just open a connection, and it had run-time error in line 34: cn.open(): SQL Server does not exist or access denied....
5
by: Ben | last post by:
Hi I am updating a project from Access to run on our SQL Server DB. Currently I am struggling to connect to the database. I have this code which is throwing this error: SQL Server does not...
12
by: Simone | last post by:
Hi! I'm an Italian Boy, Excuse Me for my incorrect language. I have a Server with Windows Server 2003 Enterprise Architect and SQL Server 2000 Enterprise. I'm developing an ASP Web...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
3
by: Randy | last post by:
Hello All, I'm getting a strange error when trying to perform a file upload. Here's the lines that uploads the file... sSaveLocation = Server.MapPath("PFPDocs") + "\\" + fileName;...
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
1
by: vamshika | last post by:
hi, I got a serious Problem. I get "Server does not exist or access denied" with 80004005 as the error code. the win2003 server uses all the latest components(like iis6,jet..etc) and is upto date....
2
by: Paolo | last post by:
Hi to all, I have an error that drove me crazy. Try the following page that should only allow to upload a file: <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.