RE: ASP .Net connection to Sql Server

From: Brad Roberts (BradRoberts_at_discussions.microsoft.com)
Date: 01/11/05


Date: Tue, 11 Jan 2005 09:57:13 -0800

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.GetPooledConnection(SqlConnectionString
> options, Boolean& isInTransaction) +372
> System.Data.SqlClient.SqlConnection.Open() +384
> System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
> ConnectionState& originalState) +44
> System.Data.Common.DbDataAdapter.FillFromCommand(Object 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
>
>



Relevant Pages

  • Re: Connection from remote computer to network SQL Server
    ... There is no firewall on the W2K machine acting as the SQL server. ... I tried making the SQL machine a "trusted" on the router. ... connection works. ... To find the IP address of your computer inside the network, ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Cannot Generate SSPI Context - help
    ... I have used the following DSN-less string: ... Microsoft OLE DB Provider for SQL Server error '80004005' ... When a connection is "trusted," it means ... > How would one connect to a remote SQL Server using Windows authen? ...
    (microsoft.public.inetserver.asp.db)
  • Re: Complicated Connection Problems bewteen ADP and SQL Server
    ... I did try to add "tcp:" onto the front of the server name. ... On the network library question, ... I added in the command "Network Library=DBMSSOCN" into my connection string. ... my inital test ADO connection worked just fine. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Accessing an SQL Server database file
    ... Do you mind explaining to me how the connection string written their works? ... All systems have SQL Server Express and SQL Server 2005 installed. ... owningObject, SqlConnectionString connectionOptions, String newPassword, ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: ASP.NET 2.0 deployment (w/ SQL Srvr 2005) error
    ... The connection string was ok. ... than the SQL Server Instance, ... owningObject, SqlConnectionString connectionOptions, String ...
    (microsoft.public.dotnet.languages.csharp)