Windows Authentication with ASP.Net and SQL Server

Discussion in 'ASP .Net Security' started by Siobhan, Sep 11, 2005.

  1. Siobhan

    Siobhan Guest

    Hi - I am trying to set up Windows Authentication for an application to pass
    through credentials to SQL Server but I have done everything that most
    documentation seems to say to do but keep getting The request failed with
    HTTP Status 401: Access Denied !!
    My set up is as follows:
    Development PC running Win XP, IIS and VS2003
    IIS Settings: Anon access is unchecked, Basic and Digest Auth are unchecked,
    Integrated Windows Authentication is checked
    Web.Config has the following lines:
    <identity impersonate="true"/>
    <authentication mode="Windows" />
    SQL Server connect string:
    "Data Source=ServerName;Initial Catalog=DBName;Integrated
    Security=SSPI;persist security info=False;Trusted_Connection=Yes"


    SQL Server is SQL Server 2000 and running on Win 2000 server remotely

    User setup in SQL Server (my network account which I am logged in as) has
    access to the db in question, SQL Server configure for mode mode
    authentication

    Is there anything else I need to do?

    Much thanks in advance!
    Siobhan, Sep 11, 2005
    #1
    1. Advertising

  2. Hello Siobhan,

    that's a typical double hop problem. you have to enable delegation for the
    web server in active directory.

    read more here: http://msdn.microsoft.com/msdnmag/issues/05/09/SecurityBriefs/default.aspx
    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > Hi - I am trying to set up Windows Authentication for an application
    > to pass
    > through credentials to SQL Server but I have done everything that most
    > documentation seems to say to do but keep getting The request failed
    > with
    > HTTP Status 401: Access Denied !!
    > My set up is as follows:
    > Development PC running Win XP, IIS and VS2003
    > IIS Settings: Anon access is unchecked, Basic and Digest Auth are
    > unchecked,
    > Integrated Windows Authentication is checked
    > Web.Config has the following lines:
    > <identity impersonate="true"/>
    > <authentication mode="Windows" />
    > SQL Server connect string:
    > "Data Source=ServerName;Initial Catalog=DBName;Integrated
    > Security=SSPI;persist security info=False;Trusted_Connection=Yes"
    > SQL Server is SQL Server 2000 and running on Win 2000 server remotely
    >
    > User setup in SQL Server (my network account which I am logged in as)
    > has access to the db in question, SQL Server configure for mode mode
    > authentication
    >
    > Is there anything else I need to do?
    >
    > Much thanks in advance!
    >
    Dominick Baier [DevelopMentor], Sep 11, 2005
    #2
    1. Advertising

  3. Or Siobhan you could hard code your username and passowrd like
    <identity impersonate="true" username="" passowrd="" />
    But i guess its not the best way to do it..
    Patrick


    "Siobhan" <> wrote in message
    news:...
    > Hi - I am trying to set up Windows Authentication for an application to

    pass
    > through credentials to SQL Server but I have done everything that most
    > documentation seems to say to do but keep getting The request failed with
    > HTTP Status 401: Access Denied !!
    > My set up is as follows:
    > Development PC running Win XP, IIS and VS2003
    > IIS Settings: Anon access is unchecked, Basic and Digest Auth are

    unchecked,
    > Integrated Windows Authentication is checked
    > Web.Config has the following lines:
    > <identity impersonate="true"/>
    > <authentication mode="Windows" />
    > SQL Server connect string:
    > "Data Source=ServerName;Initial Catalog=DBName;Integrated
    > Security=SSPI;persist security info=False;Trusted_Connection=Yes"
    >
    >
    > SQL Server is SQL Server 2000 and running on Win 2000 server remotely
    >
    > User setup in SQL Server (my network account which I am logged in as) has
    > access to the db in question, SQL Server configure for mode mode
    > authentication
    >
    > Is there anything else I need to do?
    >
    > Much thanks in advance!
    >
    >
    Patrick.O.Ige, Oct 31, 2005
    #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. Lior Amar
    Replies:
    2
    Views:
    682
    Lior Amar
    Aug 27, 2003
  2. =?Utf-8?B?UmV6YQ==?=
    Replies:
    3
    Views:
    17,928
    Carlos Barini
    Jun 7, 2004
  3. Nils Magnus Englund

    Windows authentication from ASP.NET to SQL Server

    Nils Magnus Englund, Aug 8, 2005, in forum: ASP .Net
    Replies:
    8
    Views:
    11,906
    Paul Clement
    Aug 16, 2005
  4. Doug
    Replies:
    9
    Views:
    6,849
    Terence Tirella
    Apr 7, 2006
  5. Onur Gorur

    Hybrid sql server and asp.net windows authentication

    Onur Gorur, Nov 11, 2004, in forum: ASP .Net Security
    Replies:
    3
    Views:
    157
    Joe Kaplan \(MVP - ADSI\)
    Nov 12, 2004
Loading...

Share This Page