Access is denied when calling DirectoryEntry
From: Michael (mastrauckas@appdevgrp.com)
Date: 10/29/02
- Next message: Kevin Yu: "How to use WindowsPrincipal properly??"
- Previous message: Arnaud PICHERY: "Re: Using Forms Auth, but also need Windows User ID?"
- Next in thread: Ed leNoir: "Re: Access is denied when calling DirectoryEntry"
- Reply: Ed leNoir: "Re: Access is denied when calling DirectoryEntry"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Michael" <mastrauckas@appdevgrp.com> Date: Tue, 29 Oct 2002 06:31:34 -0800
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
- Next message: Kevin Yu: "How to use WindowsPrincipal properly??"
- Previous message: Arnaud PICHERY: "Re: Using Forms Auth, but also need Windows User ID?"
- Next in thread: Ed leNoir: "Re: Access is denied when calling DirectoryEntry"
- Reply: Ed leNoir: "Re: Access is denied when calling DirectoryEntry"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|