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

G

Guest

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
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

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 said:
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.
 
B

bruce barker

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

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top