asp_database_setup thread: *** authentication between IIS and SQL Server 7... ***
I am having trouble getting IIS and SQL server to recognize the users I
try to give permissions to. I am running both on a local machine and I am
trying to get a login page to recognize a users NT login and then give
access to the SQL Server tables based on the users permissions. Thus far
I have enabled basic authentication because SQL server didn't like my
anonymous login - IUSR_DOWJ-DDC. I was finally able to get the asp to
communicate with SQL Server, but no authentication is happening. Can
someone help me out by telling me the steps involved in authenticating
users on both sides? My current code is listed below...
<%
Dim sSQL,
rs, cn, conn, id
connString= "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security Info=False;User ID=" & request.Form("id") & ";Initial
Catalog=SQLtest;Data Source=DOWJ-DDC"
Set conn =
server.CreateObject("ADODB.connection")
response.write "hola senor"
conn.open
connString
sSQL="SELECT Name FROM joel"
response.write sSQL
'Set id=rs
("Name")
'Set rs =
conn.Execute(sSQL)
%>
if you want you nt users to parse there permissions to SQL you need to disable anonymous login. You should also use ODBC connect to the DB, also the users browser may not be capable of parsing the info...IE5 is, but you should get an NT challenge anyways regardless of what you use. -----Original Message----- From: joel.dow@l... [mailto:joel.dow@l...] Sent: Friday, 29 June 2001 7:51 To: ASP Database Setup Subject: [asp_database_setup] *** authentication between IIS and SQL Server 7... *** I am having trouble getting IIS and SQL server to recognize the users I try to give permissions to. I am running both on a local machine and I am trying to get a login page to recognize a users NT login and then give access to the SQL Server tables based on the users permissions. Thus far I have enabled basic authentication because SQL server didn't like my anonymous login - IUSR_DOWJ-DDC. I was finally able to get the asp to communicate with SQL Server, but no authentication is happening. Can someone help me out by telling me the steps involved in authenticating users on both sides? My current code is listed below...
If you want to use integrated security + anonymous access you need to grant
the anonymous Internet User account login permissions to the database.
If you want to use integrated security + the user's NT credentials you need
to disable anonymous access (the browser will not attempt to authenticate
with the webserver unless it is challenged - and the browser wont be
challenged unless you disable anonymous access).
I'd recommend you enforce use of IE, since that supports NTCR, whereas
Netscape only supports Basic
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: <joel.dow@l...>
To: "ASP Database Setup" <asp_database_setup@p...>
Sent: Thursday, June 28, 2001 9:51 PM
Subject: [asp_database_setup] *** authentication between IIS and SQL Server
7... ***
: I am having trouble getting IIS and SQL server to recognize the users I
: try to give permissions to. I am running both on a local machine and I am
: trying to get a login page to recognize a users NT login and then give
: access to the SQL Server tables based on the users permissions. Thus far
: I have enabled basic authentication because SQL server didn't like my
: anonymous login - IUSR_DOWJ-DDC. I was finally able to get the asp to
: communicate with SQL Server, but no authentication is happening. Can
: someone help me out by telling me the steps involved in authenticating
: users on both sides? My current code is listed below...
:
: <%
: Dim sSQL,
: rs, cn, conn, id
:
:
: connString= "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
: Security Info=False;User ID=" & request.Form("id") & ";Initial
: Catalog=SQLtest;Data Source=DOWJ-DDC"
:
: Set conn
: server.CreateObject("ADODB.connection")
:
: response.write "hola senor"
: conn.open
: connString
:
: sSQL="SELECT Name FROM joel"
:
: response.write sSQL
: 'Set id=rs
: ("Name")
: 'Set rs
: conn.Execute(sSQL)
: %>
|





