Thursday, March 29, 2012

Separate Webserver and SQL Server -- error when connecting asp.net

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 MarinasHi, 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 [mailto:ka_marinas@.xtra.co.nz]
> 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
>
Hi, Mark!
Thank you for helping me out.
1) I am using System.Data.SqlClient for my data access.
2) I have changed the connection string which was located in my
web.config file when we separated the webserver to the sql db server
3) The authenticatio is set to Mixed mode -- SQL Server and Windows
Authentication
4) On the Webserver, the Query Analyzer is not installed on the
webserver. However if I am going to access the query analyzer, I have to
access the sql server itself.
Thanks again!
Mark Rae wrote:
> "Ann Marinas" <ka_marinas@.xtra.co.nz> wrote in message
> news:O8EQVObPFHA.2604@.TK2MSFTNGP10.phx.gbl...
>
>
> 1) Are you using the native .NET data provider, OleDb or (surely not!) ODB
C?
> 2) What ConnectionString are you using?
> 3) When you installed SQL Server, what authentication mode did you choose
> (SQL Server, Windows or mixed)?
> 4) On the SQL Server machine, launch SQL Query Analyzer (NOT ENTERPRISE
> MANAGER!) and try to log in using the UserID and password from the
> ConnectionString in 2) above - can you? If so, can you drop the database
> dropdown and select the database from the ConnectionString in 2) above? If
> so, run SELECT * FROM sysobjects - what do you see?
>

0 comments:

Post a Comment