Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Separate Webserver and SQL Server -- error when connecting asp.netapp to a database

Reply
Thread Tools

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

 
 
Wessel Troost
Guest
Posts: n/a
 
      04-11-2005
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 http://www.velocityreviews.com/forums/(E-Mail Removed)]
Posted At: Sunday, April 10, 2005 11:15 PM
Posted To: microsoft.public.dotnet.framework.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=myDBName; Integrated Securit=SSPI

tried doing the telnet, and it says:
Connecting To database...Could 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 [(E-Mail Removed)]
> Posted At: Sunday, April 10, 2005 12:55 PM
> Posted To: microsoft.public.dotnet.framework.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 connectionstring 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.SqlClient.SqlConnection object.
> > To change the SQL server, you need to find all SqlConnection objects

> and
> > update their ConnectionString property to point to the new database
> > server.
> >
> > Greetings,
> > Wessel
> >
> > -----Original Message-----
> > From: Ann Marinas [(E-Mail Removed)]
> > Posted At: Sunday, April 10, 2005 12:11 PM
> > Posted To: microsoft.public.dotnet.framework.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
> >

>
>


 
Reply With Quote
 
 
 
 
WJ
Guest
Posts: n/a
 
      04-12-2005
http://support.microsoft.com/kb/827422

John Webb


 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      05-05-2005
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="true" userName="someaccount" password="something"
/>
</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" <(E-Mail Removed)>
Newsgroups: microsoft.public.dotnet.framework.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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help. Getting a An error has occurred while establishing a connectionto the server. When connecting to SQL Server 2005, this failure may be causedby the fact that under the default settings SQL Server does not allow remote aboutjav.com@gmail.com ASP .Net 0 05-03-2008 12:43 PM
Separate Tabs, Separate Sessions BigAndy Firefox 0 05-09-2007 09:26 AM
Connecting to SQL 2000 database with SQL 2005 tools installed =?Utf-8?B?TmVpbCBQYWRkb2Nr?= ASP .Net 1 05-02-2007 03:18 PM
Using separate classpaths for separate classes? Frank Fredstone Java 1 06-27-2006 06:46 AM
How to use several separate classes (separate files) to be executed in one class (another file) EvgueniB Java 1 12-15-2003 01:18 AM



Advertisments