Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Impersonate + AD

    Hi, I've got a difficult situation...
    Is a website that runs on IIS with Anonymous Authentication, the tag
    <identity impersonate="false"> on the Web.config file. So the thread is
    executed by user "NT AUTHORITY".
    So when I use AD API ( FindOne() ) it works well.
    The point is that when I impersonate that user by code (that works well too)
    when I execute that function from the AD API it returns an error:

    {"Operation Error" } [System.Runtime.InteropServices.COMException]:
    {System.Runtime.InteropServices.COMException} System.Object:
    {System.Runtime.InteropServices.COMException} _className: null
    _COMPlusExceptionCode: -532459699 _exceptionMethod:
    {System.Reflection.RuntimeMethodInfo} _exceptionMethodString: null _helpURL:
    null _HResult: -2147016672 _innerException: { } _message: "Operation Error"
    _remoteStackIndex: 0 _remoteStackTraceString: null _source:
    "System.DirectoryServices" _stackTrace: {System.Array} _stackTraceString: "
    at System.DirectoryServices.DirectoryEntry.Bind(Boole an throwIfFail)\r\n at
    System.DirectoryServices.DirectoryEntry.Bind()\r\n at
    System.DirectoryServices.DirectoryEntry.get_AdsObj ect()\r\n at
    System.DirectoryServices.DirectorySearcher.FindAll (Boolean
    findMoreThanOne)\r\n at
    System.DirectoryServices.DirectorySearcher.FindOne ()\r\n at
    Banelco.CSB.DNN.Providers.ActiveDirectory.LdapAuth entication.GetUser(String
    username)" _xcode: -532459699 _xptrs: 0 HelpLink: null HResul


    Thanks

    Alberto Ortega


    Alberto Ortega Guest

  2. Similar Questions and Discussions

    1. Asp.net impersonate
      I don't think impersonation loads the user profile of the account being impersonated. If you think about it, that would make impersonation very...
    2. To Be or To Impersonate, that is the Question
      Alrighty, my continued foray into accessing network resources from the web server continues... When employees hit the intranet ASP.NET...
    3. DirectoryEntry Impersonate or WindowsIdentity Impersonate?
      Another security question. Our project interfaces with the Active Directory. To satisfy the security issues, we have a couple options when we talk...
    4. impersonate
      Hi all, I create a aspnet web app for my company. I set it up on a win2000 server with IIS5 as a intranet app. For security, I want to restrict...
    5. Impersonate at runtime
      Hi, I want to move my files from web servers to a shared folder on the database server. For this I impersonate the aspnet user to common...
  3. #2

    Default Re: Impersonate + AD

    I could have had a similar problem, try to check:
    [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;329986[/url]

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sds/sds/tro[/url]
    ubleshooting_authentication_problems_on_asp_pages. asp?frame=true

    Martin



    "Alberto Ortega" <beto@NOSPAMTOMEsouthworks.net> wrote in message
    news:#J0xZo0HFHA.4060@TK2MSFTNGP14.phx.gbl...
    > Hi, I've got a difficult situation...
    > Is a website that runs on IIS with Anonymous Authentication, the tag
    > <identity impersonate="false"> on the Web.config file. So the thread is
    > executed by user "NT AUTHORITY".
    > So when I use AD API ( FindOne() ) it works well.
    > The point is that when I impersonate that user by code (that works well
    too)
    > when I execute that function from the AD API it returns an error:
    >
    > {"Operation Error" } [System.Runtime.InteropServices.COMException]:
    > {System.Runtime.InteropServices.COMException} System.Object:
    > {System.Runtime.InteropServices.COMException} _className: null
    > _COMPlusExceptionCode: -532459699 _exceptionMethod:
    > {System.Reflection.RuntimeMethodInfo} _exceptionMethodString: null
    _helpURL:
    > null _HResult: -2147016672 _innerException: { } _message: "Operation
    Error"
    > _remoteStackIndex: 0 _remoteStackTraceString: null _source:
    > "System.DirectoryServices" _stackTrace: {System.Array} _stackTraceString:
    "
    > at System.DirectoryServices.DirectoryEntry.Bind(Boole an throwIfFail)\r\n
    at
    > System.DirectoryServices.DirectoryEntry.Bind()\r\n at
    > System.DirectoryServices.DirectoryEntry.get_AdsObj ect()\r\n at
    > System.DirectoryServices.DirectorySearcher.FindAll (Boolean
    > findMoreThanOne)\r\n at
    > System.DirectoryServices.DirectorySearcher.FindOne ()\r\n at
    >
    Banelco.CSB.DNN.Providers.ActiveDirectory.LdapAuth entication.GetUser(String
    > username)" _xcode: -532459699 _xptrs: 0 HelpLink: null HResul
    >
    >
    > Thanks
    >
    > Alberto Ortega
    >
    >

    mpes Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139