Re: Authentication with IIS and SQL Server on separate machines

From: Thomas Deml [MS] (
Date: 10/08/02

From: "Thomas Deml [MS]" <>
Date: Tue, 8 Oct 2002 01:00:08 -0700

That's not as easy as it should be.

To fill the REMOTE_USER, LOGON_USER or AUTH_USER variable you have to
authenticate the user otherwise it will be empty. If you authenticate with
something other than Basic you have no outbound credentials to access the
remote SQL box.

You can do the following:
RevertToSelf within you asp page and access the SQL Server as the process
identity (typically IWAM whereas this identity has to be a domain account).
I think this is a pretty common scenario but I don't know if we have an KB
article that would describe what to do.

Wife is nagging me and Conan is already on the air so I can't do it now.
I'll write something up and/or put some code together tomorrow.

Does anybody know if there is a best practice document on how to connect to
a SQL backend using Windows Authentication on SQL Server?

Thomas Deml
Lead Program Manager
Internet Information Services
Microsoft Corp.
"Sergio Vargas" <> wrote in message
> I have SQL Server 2000 in one computer, and IIS and ASP
> pages in another. I need to enable Windows NT
> authentication through the IIS computer, because I have a
> users table and need to match them with the REMOTE_USER.
> As is suggested in the Knowledge Base Article Q247931, I
> used a domain account accessible to both computers, and
> set it as the Anonymous user in the IIS computer. This
> user also has permissions in the SQL Server computer. The
> connection can be made, but I can&#8217;t detect the specific
> user.
> Is there a way to resolve this issue without having to use
> Basic Authentication?
> Thanks