469,647 Members | 1,680 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

How do you connect to SQL server using SQL users with Windows Auth? help

Hello

I am trying to resolve this for a week and pretty much tried everything, Windows authenticatio, Forms authentication, none of .net, but still get a message of. Login failed for user, 'username'.
I am able to connect with the same user but with SQL Authentication access, but this is not an option though due to company policies

I was searching on site of microsoft, looks like this used to be an old bug, has this ever fixed

Thanks in advance for your help

Reza
Nov 18 '05 #1
2 1029
First, you can turn off anonymous access. This will have the user log into
the domain and the data access will work.

Second, you can add an IUSR_MachineName account to the SQL Server with the
same password. Now, the IIS password is no longer secret and this account
has any rights you allow it to have on the SQL Server machine. Not the worst
security, but not too good.

Third, you can allow all users rights to SQL Server, even the guest account.
I should not have to tell you that this is a horrible idea.

Fourth, you can make an assembly that sits in Component Services, or COM+
(Win 2k), using Enterprise Services. You can then declaratively assign a
user to run data access under.

Fifth, you can spawn a thread with another identity that has rights to SQL.

Of the above options, opening IIS Manager and clicking off the checkbox that
allows anon access is, by far, the easiest.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"Reza" <reza> wrote in message
news:E6**********************************@microsof t.com...
Hello,

I am trying to resolve this for a week and pretty much tried everything, Windows authenticatio, Forms authentication, none of .net, but still get a
message of. Login failed for user, 'username'. I am able to connect with the same user but with SQL Authentication access, but this is not an option though due to company policies.
I was searching on site of microsoft, looks like this used to be an old bug, has this ever fixed?
Thanks in advance for your help,

Reza

Nov 18 '05 #2
if you want to connect to sqlserver as the same user as the browser:

1) turn of anonymous
2) enable basic, digest (if sqlserver not on same box as iis, turn on
credential forwarding), or windows (only supported if sqlserver is on the
iis box)
3) in web config: <identity impersonate="true" />

if you want to connect to sqlserver as a known user:

1) in web config: <identity impersonate="true" userName="domain\user"
password="mypass" />
-- bruce (sqlwork.com)
"Reza" <reza> wrote in message
news:E6**********************************@microsof t.com...
Hello,

I am trying to resolve this for a week and pretty much tried everything, Windows authenticatio, Forms authentication, none of .net, but still get a
message of. Login failed for user, 'username'. I am able to connect with the same user but with SQL Authentication access, but this is not an option though due to company policies.
I was searching on site of microsoft, looks like this used to be an old bug, has this ever fixed?
Thanks in advance for your help,

Reza

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Amadelle | last post: by
1 post views Thread by Brian Pittman | last post: by
21 posts views Thread by Steve | last post: by
6 posts views Thread by Daniel Loose | last post: by
3 posts views Thread by =?Utf-8?B?ZGF2aWQ=?= | last post: by
44 posts views Thread by John Dann | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.