SQLServer login with Trusted Connection thru ASP

J

Jim Corey

We're looking at logging on to SQLServer using Windows Authentication
from an ASP app, and trying to figure out what will work.

The following connection string works with Basic Authentication:
driver={SQL
Server};SERVER=MyServer;Database=MyDB;Trusted_Connection=yes;

Is there a way to do this with IIS security set to Integrated Windows
Authentication?

More: This is an existing app where currently each user has a database
login. We want to get away from that. Another option would be to
create a database user for the app, so we may do that. Any opinions
welcome.

TIA,
Jim
 
R

Ray Costanzo [MVP]

AFAIK, no, you cannot use integrated authentication and then in turn
use a trusted connection from the IIS server to the SQL Server. It
has something to do with the non-creation of kerberos tickets and
other sorts of things that I don't fully understand.
http://support.microsoft.com/?kbid=176377

I suggest one single SQL login for the application. Are there any
concerns with that? Not that this is the most helpful thing in the
world, but you could always do something like:

sConnectionString = Application("ConnectionString") & ";Application
Name=JimApp accessed by " & Request.ServerVariables("AUTH_USER")

if you're just curious to see who's doing what.

Ray at work
 
B

Bob Barrows [MVP]

Jim said:
We're looking at logging on to SQLServer using Windows Authentication
from an ASP app, and trying to figure out what will work.

The following connection string works with Basic Authentication:
driver={SQL
Server};SERVER=MyServer;Database=MyDB;Trusted_Connection=yes;

Is there a way to do this with IIS security set to Integrated Windows
Authentication?

More: This is an existing app where currently each user has a
database login. We want to get away from that. Another option would
be to create a database user for the app, so we may do that. Any
opinions welcome.

TIA,
Jim
This article should contain all you need to know to do this. Pay attention
and follow the links in the article where relevant:
http://www.aspfaq.com/show.asp?id=2126

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top