From: S N on 13 Jun 2010 08:55 I am running SQLServerExpress on my desktop PC having IIS on Windows XP SP3. I want to login to the SQL server through the ASP pages and access the database for displaying the results on ASP pages. I tried creating the connection string using the UDL editor with 1.) Use Windows NT Integrated Security: The connection string as designed by the UDL editor is as below: [oledb] ; Everything after this line is an OLE DB initstring Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=adminSQLServerDatabase;Data Source=127.0.0.1\SQLEXPRESS The Test Connection from within the UDL editor gives message of success for the above connection string. However, when we copy the above connection string inside an ASP page, the connection fails giving an error message. 2. ) When we use the option of "USE a specific user name and password" inside the UDL editor, then we get error message- "Test connection failed because of an error in initialising provider. Login failed for user 'sa'." The error message continues even if we use the default internet guest user account for the UDL editor. Further, if we use the connection string string of this scenario, the connection fails in the ASP page. Please advise on how to connect to the database from inside the ASP pages using suitable connection string. Also advise if OLEDB is the way to go?
From: Ken Schaefer on 16 Jun 2010 08:37 Hi, What is the error in scenario 1? Cheers Ken "S N" <uandme72(a)invalid.com> wrote in message news:uJuV6evCLHA.5808(a)TK2MSFTNGP02.phx.gbl... > I am running SQLServerExpress on my desktop PC having IIS on Windows XP > SP3. > I want to login to the SQL server through the ASP pages and access the > database for displaying the results on ASP pages. > I tried creating the connection string using the UDL editor with > 1.) Use Windows NT Integrated Security: > The connection string as designed by the UDL editor is as below: > > [oledb] > ; Everything after this line is an OLE DB initstring > Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security > Info=False;Initial Catalog=adminSQLServerDatabase;Data > Source=127.0.0.1\SQLEXPRESS > > The Test Connection from within the UDL editor gives message of success > for > the above connection string. > However, when we copy the above connection string inside an ASP page, the > connection fails giving an error message. > > 2. ) When we use the option of "USE a specific user name and password" > inside the UDL editor, then we get error message- "Test connection failed > because of an error in initialising provider. Login failed for user 'sa'." > The error message continues even if we use the default internet guest user > account for the UDL editor. > Further, if we use the connection string string of this scenario, the > connection fails in the ASP page. > > Please advise on how to connect to the database from inside the ASP pages > using suitable connection string. Also advise if OLEDB is the way to go? > >
From: Dan on 16 Jun 2010 09:47 "S N" <uandme72(a)invalid.com> wrote in message news:uJuV6evCLHA.5808(a)TK2MSFTNGP02.phx.gbl... > I am running SQLServerExpress on my desktop PC having IIS on Windows XP > SP3. > I want to login to the SQL server through the ASP pages and access the > database for displaying the results on ASP pages. > I tried creating the connection string using the UDL editor with > 1.) Use Windows NT Integrated Security: > The connection string as designed by the UDL editor is as below: > > [oledb] > ; Everything after this line is an OLE DB initstring > Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security > Info=False;Initial Catalog=adminSQLServerDatabase;Data > Source=127.0.0.1\SQLEXPRESS > > The Test Connection from within the UDL editor gives message of success > for > the above connection string. > However, when we copy the above connection string inside an ASP page, the > connection fails giving an error message. What account is IIS running under? If it's the IUSR_ account, then you need to give permissions to that account to access SQL Server Express. > 2. ) When we use the option of "USE a specific user name and password" > inside the UDL editor, then we get error message- "Test connection failed > because of an error in initialising provider. Login failed for user 'sa'." > The error message continues even if we use the default internet guest user > account for the UDL editor. Which suggests either the sa account is disabled in some way, or you have used the wrong password. During installation if you don't provide a password for the sa account then a random password is generated and the sa account is disabled, you need to re-enabled it using T-SQL. > Further, if we use the connection string string of this scenario, the > connection fails in the ASP page. Which is expected because it doesn't work even when running from an authenticated Windows account as you proved from the UDL editor. > Please advise on how to connect to the database from inside the ASP pages > using suitable connection string. Also advise if OLEDB is the way to go? Check all permissions on the IIS user account. Personally I would look into the SQL Native Client if you're only connecting to SQL Server Express. Also check that the TCP/IP protocol for SQL Server has been enabled, and that the SQL Server Browser is running. -- Da
|
Pages: 1 Prev: IIS 7 giving me 500.19 Error Next: trying to install IIS on Windows 7 |