impersonation fails on 2K server

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

  1. #1

    Default 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 uses
    impersonation of the ReportWriter account in its own Web.config file in
    that directory.

    ReportWriter is an account on the machine in the Administrator group,
    yet I get the following error when I try and even visit the first page
    in that directory (NOT when I try to first create a spreadsheet):

    Server Error in '/subsurv' Application.
    --------------------------------------------------------------------------------

    Configuration Error
    Description: An error occurred during the processing of a configuration
    file required to service this request. Please review the specific error
    details below and modify your configuration file appropriately.

    Parser Error Message: Could not create Windows user token from the
    credentials specified in the config file. Error from the operating
    system 'A required privilege is not held by the client. '

    Source Error:


    Line 4: <system.web>
    Line 5:
    Line 6: <identity impersonate="true" userName="ReportWriter"
    password="blahblahblah" />
    Line 7: <customErrors mode="Off" />
    Line 8: </system.web>


    Source File: C:\Inetpub\wwwroot\subsurv\reports\web.config Line: 6


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.0.3705.6018;
    ASP.NET Version:1.0.3705.6018



    The most aggrevating part is that it works just great on my development
    machine. I have tried matching all IIS and user/group settings as
    closely as possible. I have the same version of the .NET Framework on
    both machines (1.0 SP3). I have tried uninstalling and reinstalling the
    ..NET Framework,
    deleting and recreating the ReportWriter account. It doesn't seem to
    want to impersonate ANY account, actually, it gets the same error. I
    have added shares up the wazoo and probably a million
    other stabs in the dark, to no effect.

    Does anyone have any suggestions?! I'm relatively new to the .NET world,
    but I think I've run out of ideas. Upgrading to the 1.1 Framework is
    not an option at this point as I am still presently using VS Studio .NET
    2002 and some initially testing on the 1.1 exposed some new bugs that I
    don't want to address until I upgrade to VS .NET 2003.

    HEEEELLPPP!!! Thanks in advance. If anyone needs to see any code or
    whatnot I'll post it, but it doesn't seem to me to be a issue with my
    code. My development machine is XP Pro, target machine is 2000 Server.

    -Seth
    Seth Darr Guest

  2. Similar Questions and Discussions

    1. ASP.NET Impersonation fails on IIS
      Hi, I built an ASP.NET Web application with impersonation. This works fine, my login is recognized. Now I want to get access to a certain folder...
    2. Impersonation fails when accessing remote files.
      I am impersonating a user by setting the details in Web.config. I have confirmed that the .aspx page is running as the impersonated user. I then...
    3. Impersonation fails on all other pages
      I am trying to impersonate 3 "roles" based upon forms authentication, a SQL Server lookup, and a LogonUser call on a Win2003 1.1 box. The goal of...
    4. Impersonation fails after upgrade to .NET 1.1 Framework
      I have developed and ASP.NET application that uses the aadvapi32.dll to impersonate a domain user to gain access to files on a different server. The...
    5. ASP.NET Fails after SP4 with Impersonation
      Michael, See http://support.microsoft.com/default.aspx?scid=kb;;821546 "Michael Kennedy " <mkennedy@REMOVETHIS.unitedbinary.com> wrote in...
  3. #2

    Default Re: impersonation fails on 2K server

    You can't use this syntax on Windows 2000 to impersonate when you are set up
    with the default processModel, machine, because only system-level users have
    rights to call the LogonUser API to create a token.

    You can either switch to XP or 2003 which allow normal users to call the
    LogonUser API, change your processModel to SYSTEM (reduces security for
    ASP.NET), give the ASPNET account "act as part of the operating system"
    privileges (also reduces security for ASP.NET), use a COM+ dll to do the
    work with a different account, or abandon this approach.

    Joe K.

    "Seth Darr" <seth_darr@fishgame.state.ak.us> wrote in message
    news:10mb2ivp91613d7@corp.supernews.com...
    > 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 uses
    > impersonation of the ReportWriter account in its own Web.config file in
    > that directory.
    >
    > ReportWriter is an account on the machine in the Administrator group,
    > yet I get the following error when I try and even visit the first page
    > in that directory (NOT when I try to first create a spreadsheet):
    >
    > Server Error in '/subsurv' Application.
    > --------------------------------------------------------------------------------
    >
    > Configuration Error
    > Description: An error occurred during the processing of a configuration
    > file required to service this request. Please review the specific error
    > details below and modify your configuration file appropriately.
    >
    > Parser Error Message: Could not create Windows user token from the
    > credentials specified in the config file. Error from the operating system
    > 'A required privilege is not held by the client. '
    >
    > Source Error:
    >
    >
    > Line 4: <system.web>
    > Line 5:
    > Line 6: <identity impersonate="true" userName="ReportWriter"
    > password="blahblahblah" />
    > Line 7: <customErrors mode="Off" />
    > Line 8: </system.web>
    >
    >
    > Source File: C:\Inetpub\wwwroot\subsurv\reports\web.config Line: 6
    >
    >
    > --------------------------------------------------------------------------------
    > Version Information: Microsoft .NET Framework Version:1.0.3705.6018;
    > ASP.NET Version:1.0.3705.6018
    >
    >
    >
    > The most aggrevating part is that it works just great on my development
    > machine. I have tried matching all IIS and user/group settings as closely
    > as possible. I have the same version of the .NET Framework on both
    > machines (1.0 SP3). I have tried uninstalling and reinstalling the .NET
    > Framework,
    > deleting and recreating the ReportWriter account. It doesn't seem to
    > want to impersonate ANY account, actually, it gets the same error. I have
    > added shares up the wazoo and probably a million
    > other stabs in the dark, to no effect.
    >
    > Does anyone have any suggestions?! I'm relatively new to the .NET world,
    > but I think I've run out of ideas. Upgrading to the 1.1 Framework is not
    > an option at this point as I am still presently using VS Studio .NET 2002
    > and some initially testing on the 1.1 exposed some new bugs that I
    > don't want to address until I upgrade to VS .NET 2003.
    >
    > HEEEELLPPP!!! Thanks in advance. If anyone needs to see any code or
    > whatnot I'll post it, but it doesn't seem to me to be a issue with my
    > code. My development machine is XP Pro, target machine is 2000 Server.
    >
    > -Seth

    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