October 25, 2005 at 1:58 pm
Any help on this problem:
I have a classic ASP that needs to connect to a SQLSERVER db using windows domain ID. The userid and pwd are created in Active directory, SQL Login brought in ..
But I am not able to connect to the db using the uid/pwd. I get Login failed for the user all the time.
however if I logon to the domain using the uid/pwd, I can connect to the SQLSERVER instance/ db ...
Also cannot create a DSN with that uid/pwd.
-chandrika
October 25, 2005 at 2:05 pm
Chandrika,
Your connection string should look like this...
strConnect = "Provider=sqloledb;Data Source=MyServerName;"Initial Catalog=MyDatabaseName;Integrated Security=SSPI;"
When using windows authentication. SQL Server does not require a user name and password.
Norman
October 25, 2005 at 2:30 pm
Hi Norman,
This does not work. I now get the following message:
Microsoft OLE DB Provider for SQL Server error '80004005'
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
my problem is:
The uid/pwd is created from windows Active directory and SQL login created for the db.
I need to access this db via classic ASP only.
chandrika
October 25, 2005 at 11:37 pm
Your login failed for "user '(null)'" is due to the configuration of your IIS server - when using integrated security from a web server you need to use a domain user account with the proper permissions on both the web server and SQL server for integrated security to work.
Depending on your version of IIS/Windows server, setting up the correct credentials for your IIS accounts is different - search for "IIS Integrated Security" in the MS knowledge base for instructions for your version of IIS/Windows.
Joe
October 25, 2005 at 11:38 pm
Short answer, don't Windows login from ASP, Use SQL Server login instead:
ASP
http://support.microsoft.com/default.aspx?scid=kb;en-us;307002
ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;316989
Andy
November 17, 2005 at 3:27 pm
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy