473,890 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Separate Webserver and SQL Server -- error when connecting asp.netapp to a database

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 both the iis and sql server in a single machine. Not too
long ago, the machine had some hardware problems, and management has
decided to purchase new servers, for both asp.net and sql server.

Once we installed my webapp on the first server and the sql server on
another, we have encountered some errors with it. Basically, the
exception that keeps on saying was:

"SQL Server database does not exist or access denied."

Tried creating a windows account for the webapp to use to connect and
configure it to the sql server, but it does not work.

Tried also connecting with the database using a SQL Server account, but
to no avail.

Please help! I would really appreciate it!!
Regards,
Ann Marinas
Nov 19 '05
12 2809
Hi Ann,

Looks like there's more than one issue. I think a connection string for
SQL server looks like this:

data source=...;user id=...;password =...;initial catalog=...;

The data provider is the driver that serves your database, not the
database.

Below this, on the network layer, there's no chance your connection is
going to work if you can't connect to the database server on port 1433.

Greetings,
Wessel

-----Original Message-----
From: Ann Marinas [mailto:Ann Ma*****@discuss ions.microsoft. com]
Posted At: Sunday, April 10, 2005 11:15 PM
Posted To: microsoft.publi c.dotnet.framew ork.aspnet
Conversation: Separate Webserver and SQL Server -- error when connecting
asp.net app to a database
Subject: Re: Separate Webserver and SQL Server -- error when connecting
asp

the connection string is:

Data Provider=myDB; Initial Catalog=myDBNam e; Integrated Securit=SSPI

tried doing the telnet, and it says:
Connecting To database...Coul d not open a connection to host on port
1433 :
Connect failed
Really do appreciate your help!

"Wessel Troost" wrote:
- Post the connection string, we might be able to help.
- "telnet sqlserver 1433" to see if you can reach the SQL server. 1433
is the default SQL server port.
- Check the firewall settings on the SQL Server.
- Check if the SQL Server user has a default database, and if the user
is valid in that database.

Greetings,
Wessel

-----Original Message-----
From: Ann Marinas [mailto:ka****** **@xtra.co.nz]
Posted At: Sunday, April 10, 2005 12:55 PM
Posted To: microsoft.publi c.dotnet.framew ork.aspnet
Conversation: Separate Webserver and SQL Server -- error when connecting asp.net app to a database
Subject: Re: Separate Webserver and SQL Server -- error when connecting asp.net app to a database

Hi, Wessel!

Thank you for your reply.

I've changed my connectionstrin g property after the database was
transfered to another server and it has got all the correct values, but still no avail.

Thanks again for helping me out! Really do appreciate it!

Cheers,
Ann

Wessel Troost wrote:
An ASP.NET application typically connects to the database through a
System.Data.Sql Client.SqlConne ction object.
To change the SQL server, you need to find all SqlConnection objects

and
update their ConnectionStrin g property to point to the new database
server.

Greetings,
Wessel

-----Original Message-----
From: Ann Marinas [mailto:ka****** **@xtra.co.nz]
Posted At: Sunday, April 10, 2005 12:11 PM
Posted To: microsoft.publi c.dotnet.framew ork.aspnet
Conversation: Separate Webserver and SQL Server -- error when

connecting
asp.net app to a database
Subject: Separate Webserver and SQL Server -- error when connecting
asp.net app to a database

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 both the iis and sql server in a single machine. Not too long ago, the machine had some hardware problems, and management has decided to purchase new servers, for both asp.net and sql server.

Once we installed my webapp on the first server and the sql server on another, we have encountered some errors with it. Basically, the
exception that keeps on saying was:

"SQL Server database does not exist or access denied."

Tried creating a windows account for the webapp to use to connect and configure it to the sql server, but it does not work.

Tried also connecting with the database using a SQL Server account,

but
to no avail.

Please help! I would really appreciate it!!
Regards,
Ann Marinas



Nov 19 '05 #11
One of my developers had the same problem and I fixed it by changing the
identity with which ASP.NET
process was running that web-application. Add the following section to your
application's web.config file:
<system.web>
<identity impersonate="tr ue" userName="somea ccount" password="somet hing"
/>
</system.web>

Note that provided windows user account must have granted required
permissions to access the remote database.

I also tried something else which worked but this one was more preferred. I
will be pleased if you let me know other solutions you may find.

Jamal

----- Original Message -----
From: "Ann Marinas" <ka********@xtr a.co.nz>
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
Sent: Sunday, April 10, 2005 2:41 PM
Subject: Separate Webserver and SQL Server -- error when connecting asp.net
app to a database

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 both the iis and sql server in a single machine. Not too long
ago, the machine had some hardware problems, and management has decided to
purchase new servers, for both asp.net and sql server.

Once we installed my webapp on the first server and the sql server on
another, we have encountered some errors with it. Basically, the exception
that keeps on saying was:

"SQL Server database does not exist or access denied."

Tried creating a windows account for the webapp to use to connect and
configure it to the sql server, but it does not work.

Tried also connecting with the database using a SQL Server account, but to
no avail.

Please help! I would really appreciate it!!
Regards,
Ann Marinas

Nov 19 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2297
by: Kevin R | last post by:
I'm trying to get asp.net 1.1 running on my home PC. When I try creating a new ASP.NET Web Application in 'Visual Studio .NET 2003' I get the following error: "Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1. You will be unable to run ASP.NET Web applications or services" Thanks for any help in advance. Kevin ===============================
0
3930
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2 development client. Bur Its gives me following error message. I searched lots of things on net and tried on remote server but i didnt got suceess. Can any one tell me how to set TCP\IP connection protocol on server for particular instance. Becuase I think
2
1689
by: ¥|¥J | last post by:
Dear all, Please help~~ I have a problem in connecting my new FC5 webserver (apache 2.2 + php 5.1.4) to a few database servers through the PHP scripts (RH9, FC2, FC3). I have set host privileges correctly for the database servers. It seems that after I migrated the php files (originally in each database server) to the centralised FC5 webserver, it failed to work. Is it because of the PHP5 is compiled with MySQL version 4 +? Since...
5
1944
by: James | last post by:
Hello, I have written a simple logon page that redirects to another page when successful. All works fine on my computer but when I upload it I get the error message below. I have written it in ASP.net v2, and have put it on IIS v6 on windows server 2003. I think it may be something to do with connection string to the database,
1
6151
by: Jurgen Haan | last post by:
Hiya... I'm trying to get db2 LUW 8.2.6 X86_64 working on a netapp. We're running SLES 10. The software and instance are created locally, but when I try to create a database on a path mounted with NFS3, I get the message: SQL10004C An I/O error occurred while accessing the database directory.
3
2764
by: LamSoft | last post by:
I am not going to write a aspx to connect a SQL Server... but it tries to connect the SQL Server... Some of the Code.. protected void LoginButton_Click(object sender, EventArgs e) { if (Request.Form == null || Request.Form == "") { Session = "LocalHost"; }
2
4970
by: samadams_2006 | last post by:
Hello, I have a problem that I'm hoping someone will be able to help me resolve. 1) I have a C# Web Site in which I connect to the database: "Install Microsoft SQL Server 2005 Express Edition" via the link on: http://msdn2.microsoft.com/en-us/express/bb410792.aspx
2
3048
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error. Here is the error:
5
3565
by: Cirene | last post by:
I just deployed my new ASP.NET (3.5 FW) site to the hosting company I'm using, webhost4life. NOTE: I HAVE deployed other SQL Server sites to the same account with no issues. Now I'm getting this error. Any idea why? Server Error in '/myuser4/MyWebApp' Application. --------------------------------------------------------------------------------
0
9976
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9814
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10903
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9616
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8006
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6034
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4257
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.