Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > SQLServer login with Trusted Connection thru ASP

Reply
Thread Tools

SQLServer login with Trusted Connection thru ASP

 
 
Jim Corey
Guest
Posts: n/a
 
      12-28-2004

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_Conn ection=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






*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      12-28-2004
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

"Jim Corey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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_Conn ection=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
>
>
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      12-28-2004
Jim Corey wrote:
> 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_Conn ection=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

--
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading ASP w/SQLserver 2000 to ASP.NET w/ SQLserver 2005 =?Utf-8?B?SmVmZnJleQ==?= ASP .Net 2 04-27-2007 03:33 PM
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. rrober07 ASP .Net 4 12-23-2003 04:46 PM
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection Frederik ASP .Net 2 11-26-2003 04:01 AM
aspx - Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection Frederik ASP .Net 0 11-25-2003 09:08 PM
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Blake Versiga ASP .Net 2 07-09-2003 07:30 AM



Advertisments