Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using NT accounts instead of SQL logins

Status
Not open for further replies.

gojohnnygogogogo

Programmer
May 22, 2002
161
GB
hello everyone,
For all my asp applications I create a login on my SQL7 server then connect using that.
This is fine apart from I can;t see who is connected to the database when using SQL server enterprise manager.
Is is possible to connect to the database using another way so the NT username will be displayed in the proces information. ?

thank you for any help / links / etc.

 
Hello,
I have found this code on an asp site but can't get it to work.

'NT AUTHENTICATION
cst = "Provider=SQLOLEDB;Data Source=SERVERNAME;"
cst = cst & "Initial Catalog=DBNAME;Integrated Security=SSPI"
set conn = Server.CreateObject("ADODB.Connection")
conn.open cst

I have added my NT group to SQL server logins but I get this error :

Microsoft OLE DB Provider for SQL Server error '80040e4d'

Login failed for user '\'.

/sasp/view.asp, line 76

anybody used this method before ?
 
You need to make sure that the security on the virtual server or virtual directory is set correctly in the IIS MMC Snap-In. If you are allowing anonymous access then you will be running under the context of the IUSR_Machinename user which is not a domain user. Uncheck the anonymous access option and make sure that the challenge/response option is selected.

James :) James Culshaw
james@miniaturereview.co.uk
 
alright James,
I already have anonymous access unticked and challenge/response ticked.
I have added thw web browsers group to my IIS folder and created a SQL login based on the web browsers group.
 
morning James,
you can add a group to SQL server, but when trying to use the above code I get a loing failure.
However, I have been playgin around with this on the weekend and if you change your IIS security to Basic it works.
problem is the users need to type their NT username and password to access the site.

If anyone knows how to allow NT / SQL security without the users typing in their details each time, I would be very interested to know how to do this.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top