Re: Access is denied when calling DirectoryEntry

From: Ed leNoir (edleno@safeco.com)
Date: 11/01/02


From: "Ed leNoir" <edleno@safeco.com>
Date: Thu, 31 Oct 2002 19:32:55 -0800


Grant the privalege "Act as part of the operating system" (also known as
SE_TCB_PRIVELAGE) to ASPNET so it can do the logon. You have to use the
local security policy editor. That seems preferable to using System. The
requirement to have this privelage is dropped in Windows XP. There's a
knowledge base article out there:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306158

- Ed

"Michael" <mastrauckas@appdevgrp.com> wrote in message
news:b11d01c27f57$e17dde40$39ef2ecf@TKMSFTNGXA08...
> Hello everyone. I have a problem i'm hoping someone can
> help me with I'll copy and paste my code
>
> DirectoryEntry objDirPar = null;
> int iLength = 0;
> objDirPar = new DirectoryEntry
> ("IIS://localhost/W3SVC/1/Root/QFDemo", "Administrator", "p
> ass");
> StringBuilder sbDefaultPage = new
> StringBuilder(objDirPar.Properties
> ["DefaultDoc"].Value.ToString());
>
> Now when I run this I get "Access is denied" when I call
> objDirPar.Properties even though i'm using the
> Adminstrator acccount in the constructor??? So I put this
> into my web.config
>
> <identity impersonate="true" userName="Adminstrator"
> password="pass"/> and I get the error:
>
> 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. '
>
> The only way i can fix this problem is by changing the
> machine.config xml. If I change processModel tag and
> changing userName from machine to system everything works
> just fine. Now this is a big security hole if I do
> this!!! So is there any other way I can do this without
> putting this security hole in my web application?
>
> Also, on another note, can you share a Application
> variable in ASP 3.0 with a Application variable in ASP.NET
> if they're part of the same web application?
>
> Michael
>
>
>
>
>



Relevant Pages

  • Access is denied when calling DirectoryEntry
    ... Parser Error Message: Could not create Windows user token ... from the operating system 'A required privilege is not ... changing userName from machine to system everything works ... Now this is a big security hole if I do ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: DRAM data persistence
    ... This is very correct otherwise there would be a huge security hole. ... Name ONE operating system that does this. ... "- Object reuse functionality to clear file system and memory objects ...
    (sci.electronics.design)
  • Re: DRAM data persistence
    ... This is very correct otherwise there would be a huge security hole. ... Name ONE operating system that does this. ... imaginary OS feature. ... MVS, and I believe any other OS that is B2 rated. ...
    (sci.electronics.design)
  • Re: DRAM data persistence
    ... Nico Coesel wrote: ... This is very correct otherwise there would be a huge security hole. ... Name ONE operating system that does this. ... imaginary OS feature. ...
    (sci.electronics.design)