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

Discussion in 'ASP .Net' started by =?Utf-8?B?UmV6YQ==?=, Jun 8, 2004.

  1. 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
    =?Utf-8?B?UmV6YQ==?=, Jun 8, 2004
    #1
    1. Advertising

  2. 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:...
    > 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
    Cowboy \(Gregory A. Beamer\) [MVP], Jun 8, 2004
    #2
    1. Advertising

  3. =?Utf-8?B?UmV6YQ==?=

    bruce barker Guest

    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:...
    > 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
    bruce barker, Jun 8, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Q2hyaXMgTW9oYW4=?=

    Configuring Windows Auth & Forms Auth in Asp.Net

    =?Utf-8?B?Q2hyaXMgTW9oYW4=?=, Apr 28, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    685
    =?Utf-8?B?Q2hyaXMgTW9oYW4=?=
    Apr 28, 2004
  2. =?Utf-8?B?UmV6YQ==?=
    Replies:
    3
    Views:
    17,923
    Carlos Barini
    Jun 7, 2004
  3. =?Utf-8?B?ZGhucml2ZXJzaWRl?=

    Windows Auth, but Forms Auth for one page?

    =?Utf-8?B?ZGhucml2ZXJzaWRl?=, Jan 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    542
    Elton Wang
    Jan 8, 2005
  4. Chris Mohan

    Configuring Windows Auth & Forms Auth in Asp.Net

    Chris Mohan, Apr 28, 2004, in forum: ASP .Net Security
    Replies:
    2
    Views:
    405
    Chris Mohan
    Apr 29, 2004
  5. Ed Staffin
    Replies:
    1
    Views:
    329
    Ken Schaefer
    Apr 17, 2006
Loading...

Share This Page