Impersonation with DCOM server

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

  1. #1

    Default Impersonation with DCOM server

    I have an ASP.NET application that accesses a DCOM object
    on a remote server. I am using Windows Authentication to
    allow users to have access to my ASP.NET application.
    Then, the ASP.NET application will attempt to connect to
    the DCOM object. However, connections to the DCOM object
    will only be allowed to users whose NT Domain account
    have been granted access to it. I have the web.config file set up as follows

    <authentication mode="Windows" /><identity impersonate="true" /

    I assumed that this would me that requests to the DCOM server should go out as the authenticated user. However, that doesn't seem to be the case as I keep getting a Access is Denied error whenever I attemp
    to access the DCOM object. If I then change the identity element to include a valid domain account and password, it works

    <identity impersonate="true" userName="somedomain\someuserid" password="password" /

    I really do not want to hardcode a username and password into the web.config file. How can I make my ASP.NET application "pass off" the authenticated user to the DCOM server rather than attempting to access it as the ASPNET account? Is that even possible? I've tried even wrapping the call to the DCOM object inside code that is supposed to turn impersonation and that still results in an Access is Denied error

    Any help would be appreciated

    Thanks

    Ivan Samuelson Guest

  2. Similar Questions and Discussions

    1. impersonation fails on 2K server
      I've got an ASP.NET web app that generates dynamic excel spreadsheets via COM. It does this work in a seperate subdirectory called "reports" and...
    2. Error ASP 0178 on Windows 2003 Server (IIS6) by Server.CreateObject on DCOM registred Component
      Heres is a workaround, 1. go to Administrative Tools> Component Services 2. expand COM Services and right click on My computer. 3. click...
    3. DCOM - 32Bit inproc server with 64 bit client
      I am unable to find much information on this topic can you please help. There are lot of articles explaining that out of process (remote/local)...
    4. Would turning off DCOM on Win 2000 affect FileMaker Server system
      Would turning off DCOM on Win 2000 affect the FileMaker Server system I have running? Thanks!
    5. Error: The server did not register with DCOM within the required timeout.
      Kevin wrote: Argh... weird! Processes are *not* light weight on windows, use threads instead.
  3. #2

    Default Re: Impersonation with DCOM server

    I believe I answered your question previously in the dotnet.security group.

    The reason it works when you specify a username and password is that a
    primary token is created for that user and it is used to impersonate.
    Primary tokens can make one hop to another machine on the network.

    When you just use impersonation and integrated windows authentication, you
    get an impersonation token on the IIS server. Impersonation tokens don't
    hop to other servers unless Kerberos delegation is enabled and working.

    There are helpful tech notes on Kerberos delegation in the Knowledge Base.

    Joe K.

    "Ivan Samuelson" <anonymous@discussions.microsoft.com> wrote in message
    news:995859C9-8BD7-4F51-A5E2-AAA04612C03D@microsoft.com...
    > I have an ASP.NET application that accesses a DCOM object
    > on a remote server. I am using Windows Authentication to
    > allow users to have access to my ASP.NET application.
    > Then, the ASP.NET application will attempt to connect to
    > the DCOM object. However, connections to the DCOM object
    > will only be allowed to users whose NT Domain account
    > have been granted access to it. I have the web.config file set up as
    follows:
    >
    > <authentication mode="Windows" /><identity impersonate="true" />
    >
    > I assumed that this would me that requests to the DCOM server should go
    out as the authenticated user. However, that doesn't seem to be the case as
    I keep getting a Access is Denied error whenever I attempt
    > to access the DCOM object. If I then change the identity element to
    include a valid domain account and password, it works:
    >
    > <identity impersonate="true" userName="somedomain\someuserid"
    password="password" />
    >
    > I really do not want to hardcode a username and password into the
    web.config file. How can I make my ASP.NET application "pass off" the
    authenticated user to the DCOM server rather than attempting to access it as
    the ASPNET account? Is that even possible? I've tried even wrapping the call
    to the DCOM object inside code that is supposed to turn impersonation and
    that still results in an Access is Denied error.
    >
    > Any help would be appreciated.
    >
    > Thanks!
    >

    Joe Kaplan \(MVP - ADSI\) 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