Groups | Blog | Home
all groups > inetserver asp db > december 2003 >

inetserver asp db : OLEDB connection string help



Gabriel
12/30/2003 12:20:05 PM
I'm trying to connect to a SQL Server using dsn-less
connection string such as "PROVIDER=SQLOLEDB;DATA
SOURCE=SQLSERVER;UID=DOMAIN\username;PWD=password;DATABASE
=myDB" I know it works with Standard SQL Server
authentication but is it possible to use Windows
authentication like in the example above? It tells me
that login failed for user.

Any help or suggestions would be appreciated.

Thanks,

Bob Barrows
12/30/2003 3:29:53 PM
[quoted text, click to view]
http://www.aspfaq.com/show.asp?id=2126

HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Foo Man Chew
12/30/2003 11:53:05 PM
[quoted text, click to view]

To use Windows Authentication, you don't specify the username and password.
(If you can hardcode a Windows password into an ASP page, kind of defeats
the purpose, and isn't very secure.) If you want to use Windows
authentication, you either have to add the IUSR_WebServer account manually
to the SQL Server machine, or else force users to authenticate and a Windows
group (or individual users, if required) to SQL Server. For most web
applications, it makes much more sense to use SQL Auth.

AddThis Social Bookmark Button