473,395 Members | 1,675 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,395 software developers and data experts.

ASP .Net connection to Sql Server

Hi,
I have a new ASP .Net project that has been developed on our
development machine and connects to SQL Server 2000 on the same
machine. It is connecting via a connection string similiar to:

Data Source=[Machine Name];Initial Catalog=[Our
Catalog];uid=[Username];Password=[Password]
Everything works fine on this machine. I can change the the connection
string to our production SQL server and everything runs fine. The
production SQL server is also running SQL 2000. All machines are on
Windows 2000 with MDAC 2.8.
Our production web server is in its own zone in the firewall so their
isn't full network access, just a hole to the sql server. When I move
the site to the server I start to get the error below when trying to
access the sql server from the project.
All of the regular ASP connections work, both through named pipes and
ODBC but this one won't. I have read a ton of articles and newsgroup
postings about this now but haven't been able to resolve it and I am
ready to start pulling hair.
I have changed the processmodel to be the system account. I have added
"Network Library=dbmssocn" to the connection string. I have tried
impersonation, though since this isn't on the network I didn't expect
it to work. Reboots, restarts, nothing works.
Is there anything else that I am missing?
Thanks,
Dave Dudley
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:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString
options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable) +36
KnitPicks.SearchAll.Page_Load(Object sender, EventArgs e) in
C:\Documents and
Settings\Dudleyd\VSWebCache\cagdev_4251\SearchAll. aspx.vb:194
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750

Nov 19 '05 #1
5 1779
I use the same scenario with one of mine.

Using "dbmssocn" tells it to use the TCP/IP network driver, good.

It may be having a problem resolving the machine name, try using the IP of
the SQL box instead of the name.
"Dave Dudley" wrote:
Hi,
I have a new ASP .Net project that has been developed on our
development machine and connects to SQL Server 2000 on the same
machine. It is connecting via a connection string similiar to:

Data Source=[Machine Name];Initial Catalog=[Our
Catalog];uid=[Username];Password=[Password]
Everything works fine on this machine. I can change the the connection
string to our production SQL server and everything runs fine. The
production SQL server is also running SQL 2000. All machines are on
Windows 2000 with MDAC 2.8.
Our production web server is in its own zone in the firewall so their
isn't full network access, just a hole to the sql server. When I move
the site to the server I start to get the error below when trying to
access the sql server from the project.
All of the regular ASP connections work, both through named pipes and
ODBC but this one won't. I have read a ton of articles and newsgroup
postings about this now but haven't been able to resolve it and I am
ready to start pulling hair.
I have changed the processmodel to be the system account. I have added
"Network Library=dbmssocn" to the connection string. I have tried
impersonation, though since this isn't on the network I didn't expect
it to work. Reboots, restarts, nothing works.
Is there anything else that I am missing?
Thanks,
Dave Dudley
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:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString
options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
srcTable) +36
KnitPicks.SearchAll.Page_Load(Object sender, EventArgs e) in
C:\Documents and
Settings\Dudleyd\VSWebCache\cagdev_4251\SearchAll. aspx.vb:194
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750

Nov 19 '05 #2
Thanks,

Since the web server is in the DMZ the only way I have access is by IP.
I have it set to IP and I even tried doing a host file entry and used
the name but that didn't work.

Dave

Nov 19 '05 #3
you want to use the tcp/ip library and standard security. you will need the
following info:

1) from the sql dba the tcp/ip port number the sqlserver is listing on
(default 1433, but should be changed)
2) from the fire wall people, the ipaddress of the sqlserver from the dmz
(usually they use nat translation and it will not match what you use from
your dev box
3) check that the port number the sql box is using is the opened port on the
firewall.

once you have the above info change the connection string to:
"server=ipaddess,portnumber"

-- bruce (sqlwork.com)
"Dave Dudley" <da*********@craftsamericana.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
| Hi,
|
|
| I have a new ASP .Net project that has been developed on our
| development machine and connects to SQL Server 2000 on the same
| machine. It is connecting via a connection string similiar to:
|
|
|
| Data Source=[Machine Name];Initial Catalog=[Our
| Catalog];uid=[Username];Password=[Password]
| Everything works fine on this machine. I can change the the connection
| string to our production SQL server and everything runs fine. The
| production SQL server is also running SQL 2000. All machines are on
| Windows 2000 with MDAC 2.8.
|
|
| Our production web server is in its own zone in the firewall so their
| isn't full network access, just a hole to the sql server. When I move
| the site to the server I start to get the error below when trying to
| access the sql server from the project.
|
|
| All of the regular ASP connections work, both through named pipes and
| ODBC but this one won't. I have read a ton of articles and newsgroup
| postings about this now but haven't been able to resolve it and I am
| ready to start pulling hair.
|
|
| I have changed the processmodel to be the system account. I have added
| "Network Library=dbmssocn" to the connection string. I have tried
| impersonation, though since this isn't on the network I didn't expect
| it to work. Reboots, restarts, nothing works.
|
|
| Is there anything else that I am missing?
|
|
| Thanks,
|
|
| Dave Dudley
|
|
| 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:
|
|
| An unhandled exception was generated during the execution of the
| current web request. Information regarding the origin and location of
| the exception can be identified using the exception stack trace below.
|
|
| Stack Trace:
|
|
| [SqlException: SQL Server does not exist or access denied.]
| System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
| isInTransaction) +474
|
|
|
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec
tionString
| options, Boolean& isInTransaction) +372
| System.Data.SqlClient.SqlConnection.Open() +384
| System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
| ConnectionState& originalState) +44
| System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
| startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
| CommandBehavior behavior) +304
| System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
| startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
| CommandBehavior behavior) +77
| System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
| srcTable) +36
| KnitPicks.SearchAll.Page_Load(Object sender, EventArgs e) in
| C:\Documents and
|
|
| Settings\Dudleyd\VSWebCache\cagdev_4251\SearchAll. aspx.vb:194
| System.Web.UI.Control.OnLoad(EventArgs e) +67
| System.Web.UI.Control.LoadRecursive() +35
| System.Web.UI.Page.ProcessRequestMain() +750
|
Nov 19 '05 #4
This is so frustrating. I have the IP address set, the firewall is
open, and I know it is because my other connections still work through
ASP and client tools. I just don't see what would be holding it back.
Dave

Nov 19 '05 #5
Just a few thoughts to make sure all the bases get covered...

Do the other successful connections work using the "dbmssocn" Network
Library.?

Are you sure the SQL Server is configured for TCP/IP? (It will default to
another protocol if not. Like Named Pipes...)

Are you sure the SQL server accepts SQL Server Logins(vs NTLM)?

Can you get a ASP page on the web server to connect ok?

The firewall people can probably see what activity is coming from the web
server on the SQL Server port (what was it? 1433?). Can they be of help?

Can you access the SQL server log to possibly see something there?

"Dave Dudley" wrote:
This is so frustrating. I have the IP address set, the firewall is
open, and I know it is because my other connections still work through
ASP and client tools. I just don't see what would be holding it back.
Dave

Nov 19 '05 #6

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

Similar topics

13
by: Fortepianissimo | last post by:
Here is the situation: I want my server started up upon connection. When the first connection comes in, the server is not running. The client realizes the fact, and then starts up the server and...
6
by: Paul Robinson | last post by:
I am developing a website in ASP that connects to a Sybase database. However, when I try to open a connection to the database the page will not load. The script does not timeout, nor the...
5
by: Fred Zuckerman | last post by:
Hello All, After reading in this group about the preference for connecting to a SQL Server using a connection string instead of a DSN file, I have done just that. BUT, I cannot update my data....
6
by: Sharon | last post by:
Hi all. I'm trying first time async socket connection. In all the examples i've seen, the server connection is closed when the message is complete. Is it common to close the connection after...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
5
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...
16
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
2
by: Johnson | last post by:
I'm trying to fix a "sub optimal" situation with respect to connection string management. Your thoughtful responses will be appreciated. I just started with a new client who has a bunch of legacy...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.