Re: SQL Server connection string works with IIS 5.1 but not IIS 6 in ASP.NET

From: Carl Prothman [MVP] (carlpr_at_spamcop.net)
Date: 08/13/03


Date: Wed, 13 Aug 2003 10:18:18 -0700


"John Kennedy" <jfk@geopraxis.com> wrote
> I have a very simple aspx file that runs on WinXP Pro IIS 5.1 and connects
> to a SQL Server 2k DB running on a Win2003 Server box. It works fine with
> the connection string below (X replace real values for security).
> "packet size=4096;user id=XXX;pwd=XXX;data source='XX.XXX.XXX.X';persist
> security info=False;initial catalog=XXX"
> When I place this aspx file on the Win2003 Server under a Virtual Directory
> I get the following error.
> "SQL Server does not exist or access denied"
> I have replaced the IP address for the data source value in the original
> connection string with every imaginable option (local, localhost,
> <servername\sqlservername>, etc.) to no avail.
> I have added ASPNET, NETWORK SERVICES, & SYSTEM as logins to the SQL Server
> and the database I am trying to access. I have modified my <processModel
> section of the machine.config file to use the SYSTEM user name.
>

John,
Is SQL Server setup for Mix Secuirty mode?

Do you have an evaluation copy of SQL Server 2000 which expired?

Is the connecton timeout set too short?

Are you using the SqlConnection object?

Also, did you turn off connection pooling?
http://support.microsoft.com/default.aspx?scid=kb;en-us;328476

Try adding the SQL Server port number to the IP address to your connection string.
    "Data Source=xxx.xxx.xxx.xxx,1433"
(use the port number your SQL Server is setup for. Default is 1433)

Try adding the TCP/IP network library to your connection string
    "Network Library=DBMSSOCN"
http://www.able-consulting.com/dotnet/adonet/Data_Providers.htm#SQLClientManagedProviderIP

--
Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com


Relevant Pages

  • Re: One Connection String for Multiple Users (SQL)
    ... Hitchhiker’s Guide to Visual Studio and SQL Server ... "William Vaughn" wrote: ... This uses the> same connection string for all instances of the application. ...
    (microsoft.public.sqlserver.connect)
  • RE: How do I configure Analysis Services for Excel 2003 users?
    ... they had had Office 2003 installed AFTER SQL Server. ... > I have been preparing a set of cubes in Analysis Services 2005 to be viewed ... > Excel reports have been designed as pivot tables based on AS cubes, ... > Surely it must be that the connection string is incorrect but I seem to have ...
    (microsoft.public.sqlserver.olap)
  • Re: Connecting to Sql Server using an IP address
    ... using IP address without port number (default port number ... of SQL Server is 1433) cannot connect to the SQL Server on a remote ... name in the connection string can connect the remote machine successfully. ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Problem connecting to an SQL 2005 Express Instance in RANU mod
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... I'm using SQL2005 Express User Instance Feature. ... attaching an MDB file with the following connection string: ...
    (microsoft.public.sqlserver.connect)
  • asp.net 2.0 login control
    ... A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.] ... These problems left me stranded for days, then today, on another machine, I hit a different set of problems I kept getting the following "Failed to generate user instance of SQL Server due to a failure in starting the process for the user instance. ... (Basically this is a new option in the connection string that allows you to point out where the ..mdf file resides eliminating the need to create database in some SQL instance.) ... Beware that the windows account of the user that first creates the connection in this databaseless manner, becomes exclusive user for this file and no other windows account will be able to create a connection to this file. ...
    (microsoft.public.dotnet.languages.vb)

Loading