Ask a Question related to ASP.NET Security, Design and Development.
-
Yogesh Pancholi #1
Permissions Issues With ASPNET Account
For some unexplained reason, I am suddenly unable to browse to a virtual
directory on my laptop. I have a number of sample websites to which I could
happliy browse up until last week. As of Monday, if I browse to any of the
sites, I get an HttpException saying "The directory does not exist or is not
accessible because of security settings." I honestly have not changed
anything at all.
I have checked and re-checked that ASPNET indeed has the three required
permissions on the virtual directories (ie. Read, Read & Execute, and List
Folder Contents). As a workaround, the only way that I am able to currently
browse to the sample websites is I 'upgrade' the access level privilege in
the machine.config as follows:
Go to folder C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG, and edit the
machine.config file. Find <processModel enable="true" timeout="Infinite"....
and change the username attribute from 'machine' to 'system'. Save the file,
and restart IIS.
I have trawled the internet in the last couple of days, and have discovered
many others have experienced the same problem. For most, it was a matter of
applying the ASPNET account permissions to the virtual folder, but there are
still a number of other people (like myself) for whom this problem persists.
I have even ran aspnet_regiis.exe, but still no joy.
My system specification is as follows:
Windows XP Professional SP1.
Internet Explorer 6.0.2800 SP2.
..NET Framework v1.1
Visual Studio .NET 2003
Below is the exception:
Server Error in '/EC315CH02' Application.
--------------------------------------------------------------------------------
Server cannot access application directory 'C:\Documents and
Settings\...<SubFolders>...\'. The directory does not exist or is not
accessible because of security settings.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Web.HttpException: Server cannot access
application directory 'C:\Documents and Settings\...<SubFolders>...\'. The
directory does not exist or is not accessible because of security settings.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Server cannot access application directory
'C:\Documents and Settings\...<SubFolders>...\'. The directory does not exist
or is not accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDi rectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +264
[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +990
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +128
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
Does anyone know what could be the problem???
Can anyone provide any assistance to resolve it???
--
....Yogesh
"If a pig loses its voice, is it disgruntled???"
Yogesh Pancholi Guest
-
ASPNET User ID Permissions
Hi all, I suppose this is as good of a group as any for my question. I have a W2K Server (not a domain controller) running IIS 5. I want to run... -
Using LogonUser API in ASP.net with an account other than ASPNet account
I am trying to use the LogonUser API function from ASP.Net. This works fine on my machine which is Windows XP but fails with error code 1314 on... -
ASPNET Account
I needed to go to my user accounts when I discovered this aspnet machine account.I didn't know where it came from so I deleted the account. Now I... -
restoring default permissions for aspnet account
I accidentally changed permissions on a large number of files for my machine/aspnet account. Is there an easy way to restore the defaults? --... -
Using the Jscript to update the ASPNET account to have the needed permissions
Hi, Can i use the Jscript to update the ASPNET account to have the needed permissions to create the new EventSource in the EventLog? Can you give... -
Ken Schaefer #2
Re: Permissions Issues With ASPNET Account
Hi,
The folders under "c:\documents and settings" are ACLed so that only the
user (and Administrators) can access those files. It seems that your
application wishes to access some file or folder underneath some user's
profile (you have obscured the actual directory structure in your post), but
the ASPNET user won't have access to that unless either you place it into
the Administrators group -or- it's the ASPNET user account's folder.
Cheers
Ken
--
Blog: [url]www.adopenstatic.com/cs/blogs/ken/[/url]
Web: [url]www.adopenstatic.com[/url]
"Yogesh Pancholi" <YogeshPancholi@discussions.microsoft.com> wrote in
message news:AD9A7E8C-FEAD-40FD-BE45-C7062B8B39C0@microsoft.com...
: For some unexplained reason, I am suddenly unable to browse to a virtual
: directory on my laptop. I have a number of sample websites to which I
could
: happliy browse up until last week. As of Monday, if I browse to any of the
: sites, I get an HttpException saying "The directory does not exist or is
not
: accessible because of security settings." I honestly have not changed
: anything at all.
:
: I have checked and re-checked that ASPNET indeed has the three required
: permissions on the virtual directories (ie. Read, Read & Execute, and List
: Folder Contents). As a workaround, the only way that I am able to
currently
: browse to the sample websites is I 'upgrade' the access level privilege in
: the machine.config as follows:
:
: Go to folder C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG, and edit
the
: machine.config file. Find <processModel enable="true"
timeout="Infinite"....
: and change the username attribute from 'machine' to 'system'. Save the
file,
: and restart IIS.
:
: I have trawled the internet in the last couple of days, and have
discovered
: many others have experienced the same problem. For most, it was a matter
of
: applying the ASPNET account permissions to the virtual folder, but there
are
: still a number of other people (like myself) for whom this problem
persists.
: I have even ran aspnet_regiis.exe, but still no joy.
:
: My system specification is as follows:
:
: Windows XP Professional SP1.
: Internet Explorer 6.0.2800 SP2.
: .NET Framework v1.1
: Visual Studio .NET 2003
:
: Below is the exception:
:
: Server Error in '/EC315CH02' Application.
: --------------------------------------------------------------------------------
:
: Server cannot access application directory 'C:\Documents and
: Settings\...<SubFolders>...\'. The directory does not exist or is not
: accessible because of security settings.
: Description: An unhandled exception occurred during the execution of the
: current web request. Please review the stack trace for more information
about
: the error and where it originated in the code.
:
: Exception Details: System.Web.HttpException: Server cannot access
: application directory 'C:\Documents and Settings\...<SubFolders>...\'. The
: directory does not exist or is not accessible because of security
settings.
:
: Source Error:
:
: An unhandled exception was generated during the execution of the current
web
: request. Information regarding the origin and location of the exception
can
: be identified using the exception stack trace below.
:
: Stack Trace:
:
:
: [HttpException (0x80004005): Server cannot access application directory
: 'C:\Documents and Settings\...<SubFolders>...\'. The directory does not
exist
: or is not accessible because of security settings.]
: System.Web.HttpRuntime.EnsureAccessToApplicationDi rectory() +72
: System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +264
:
: [HttpException (0x80004005): ASP.NET Initialization Error]
: System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +990
: System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +128
:
: --------------------------------------------------------------------------------
: Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET
: Version:1.1.4322.2032
:
: Does anyone know what could be the problem???
:
: Can anyone provide any assistance to resolve it???
:
: --
: ...Yogesh
: "If a pig loses its voice, is it disgruntled???"
Ken Schaefer Guest
-
Yogesh Pancholi #3
Re: Permissions Issues With ASPNET Account
Thank you, Ken, for your response.
The ASP.NET application resides in a subfolder under my own user profile, to
which I have granted permissions (ie. Read, Read & Execute, and List Folder
Contents) to the ASPNET user account. Further, the application subfolder
resides underneath the "Visual Studio Projects" folder created when VS 2003
was installed.
The funny thing is, this problem has literally started occurring "out of the
blue". I was able to browse to the application on Friday, but could not do so
on Monday. I swear there was nothing added/changed/removed/configured/..etc.
during the weekend. It just doesn't make sense why it suddenly stopped
working. As I mentioned in the original note, if I elevate the application
credentials to 'SYSTEM' in the machine.config file, then everything works
fine, but decreasing back to 'MACHINE' (ie. using ASPNET account), then it
doesn't work.
....Yogesh
"Ken Schaefer" wrote:
> Hi,
>
> The folders under "c:\documents and settings" are ACLed so that only the
> user (and Administrators) can access those files. It seems that your
> application wishes to access some file or folder underneath some user's
> profile (you have obscured the actual directory structure in your post), but
> the ASPNET user won't have access to that unless either you place it into
> the Administrators group -or- it's the ASPNET user account's folder.
>
> Cheers
> Ken
>
> --
> Blog: [url]www.adopenstatic.com/cs/blogs/ken/[/url]
> Web: [url]www.adopenstatic.com[/url]
>
>
> "Yogesh Pancholi" <YogeshPancholi@discussions.microsoft.com> wrote in
> message news:AD9A7E8C-FEAD-40FD-BE45-C7062B8B39C0@microsoft.com...
> : For some unexplained reason, I am suddenly unable to browse to a virtual
> : directory on my laptop. I have a number of sample websites to which I
> could
> : happliy browse up until last week. As of Monday, if I browse to any of the
> : sites, I get an HttpException saying "The directory does not exist or is
> not
> : accessible because of security settings." I honestly have not changed
> : anything at all.
> :
> : I have checked and re-checked that ASPNET indeed has the three required
> : permissions on the virtual directories (ie. Read, Read & Execute, and List
> : Folder Contents). As a workaround, the only way that I am able to
> currently
> : browse to the sample websites is I 'upgrade' the access level privilege in
> : the machine.config as follows:
> :
> : Go to folder C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG, and edit
> the
> : machine.config file. Find <processModel enable="true"
> timeout="Infinite"....
> : and change the username attribute from 'machine' to 'system'. Save the
> file,
> : and restart IIS.
> :
> : I have trawled the internet in the last couple of days, and have
> discovered
> : many others have experienced the same problem. For most, it was a matter
> of
> : applying the ASPNET account permissions to the virtual folder, but there
> are
> : still a number of other people (like myself) for whom this problem
> persists.
> : I have even ran aspnet_regiis.exe, but still no joy.
> :
> : My system specification is as follows:
> :
> : Windows XP Professional SP1.
> : Internet Explorer 6.0.2800 SP2.
> : .NET Framework v1.1
> : Visual Studio .NET 2003
> :
> : Below is the exception:
> :
> : Server Error in '/EC315CH02' Application.
> : --------------------------------------------------------------------------------
> :
> : Server cannot access application directory 'C:\Documents and
> : Settings\...<SubFolders>...\'. The directory does not exist or is not
> : accessible because of security settings.
> : Description: An unhandled exception occurred during the execution of the
> : current web request. Please review the stack trace for more information
> about
> : the error and where it originated in the code.
> :
> : Exception Details: System.Web.HttpException: Server cannot access
> : application directory 'C:\Documents and Settings\...<SubFolders>...\'. The
> : directory does not exist or is not accessible because of security
> settings.
> :
> : Source Error:
> :
> : An unhandled exception was generated during the execution of the current
> web
> : request. Information regarding the origin and location of the exception
> can
> : be identified using the exception stack trace below.
> :
> : Stack Trace:
> :
> :
> : [HttpException (0x80004005): Server cannot access application directory
> : 'C:\Documents and Settings\...<SubFolders>...\'. The directory does not
> exist
> : or is not accessible because of security settings.]
> : System.Web.HttpRuntime.EnsureAccessToApplicationDi rectory() +72
> : System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +264
> :
> : [HttpException (0x80004005): ASP.NET Initialization Error]
> : System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +990
> : System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +128
> :
> : --------------------------------------------------------------------------------
> : Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
> ASP.NET
> : Version:1.1.4322.2032
> :
> : Does anyone know what could be the problem???
> :
> : Can anyone provide any assistance to resolve it???
> :
> : --
> : ...Yogesh
> : "If a pig loses its voice, is it disgruntled???"
>
>
>Yogesh Pancholi Guest
-
Yogesh Pancholi #4
Re: Permissions Issues With ASPNET Account
Thank you, Ken, for your response.
The ASP.NET application resides in a subfolder under my own user profile, to
which I have granted permissions (ie. Read, Read & Execute, and List Folder
Contents) to the ASPNET user account. Further, the application subfolder
resides underneath the "Visual Studio Projects" folder created when VS 2003
was installed.
The funny thing is, this problem has literally started occurring "out of the
blue". I was able to browse to the application on Friday, but could not do so
on Monday. I swear there was nothing added/changed/removed/configured/..etc.
during the weekend. It just doesn't make sense why it suddenly stopped
working. As I mentioned in the original note, if I elevate the application
credentials to 'SYSTEM' in the machine.config file, then everything works
fine, but decreasing back to 'MACHINE' (ie. using ASPNET account), then it
doesn't work.
....Yogesh
"Ken Schaefer" wrote:
> Hi,
>
> The folders under "c:\documents and settings" are ACLed so that only the
> user (and Administrators) can access those files. It seems that your
> application wishes to access some file or folder underneath some user's
> profile (you have obscured the actual directory structure in your post), but
> the ASPNET user won't have access to that unless either you place it into
> the Administrators group -or- it's the ASPNET user account's folder.
>
> Cheers
> Ken
>
> --
> Blog: [url]www.adopenstatic.com/cs/blogs/ken/[/url]
> Web: [url]www.adopenstatic.com[/url]
>
>
> "Yogesh Pancholi" <YogeshPancholi@discussions.microsoft.com> wrote in
> message news:AD9A7E8C-FEAD-40FD-BE45-C7062B8B39C0@microsoft.com...
> : For some unexplained reason, I am suddenly unable to browse to a virtual
> : directory on my laptop. I have a number of sample websites to which I
> could
> : happliy browse up until last week. As of Monday, if I browse to any of the
> : sites, I get an HttpException saying "The directory does not exist or is
> not
> : accessible because of security settings." I honestly have not changed
> : anything at all.
> :
> : I have checked and re-checked that ASPNET indeed has the three required
> : permissions on the virtual directories (ie. Read, Read & Execute, and List
> : Folder Contents). As a workaround, the only way that I am able to
> currently
> : browse to the sample websites is I 'upgrade' the access level privilege in
> : the machine.config as follows:
> :
> : Go to folder C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG, and edit
> the
> : machine.config file. Find <processModel enable="true"
> timeout="Infinite"....
> : and change the username attribute from 'machine' to 'system'. Save the
> file,
> : and restart IIS.
> :
> : I have trawled the internet in the last couple of days, and have
> discovered
> : many others have experienced the same problem. For most, it was a matter
> of
> : applying the ASPNET account permissions to the virtual folder, but there
> are
> : still a number of other people (like myself) for whom this problem
> persists.
> : I have even ran aspnet_regiis.exe, but still no joy.
> :
> : My system specification is as follows:
> :
> : Windows XP Professional SP1.
> : Internet Explorer 6.0.2800 SP2.
> : .NET Framework v1.1
> : Visual Studio .NET 2003
> :
> : Below is the exception:
> :
> : Server Error in '/EC315CH02' Application.
> : --------------------------------------------------------------------------------
> :
> : Server cannot access application directory 'C:\Documents and
> : Settings\...<SubFolders>...\'. The directory does not exist or is not
> : accessible because of security settings.
> : Description: An unhandled exception occurred during the execution of the
> : current web request. Please review the stack trace for more information
> about
> : the error and where it originated in the code.
> :
> : Exception Details: System.Web.HttpException: Server cannot access
> : application directory 'C:\Documents and Settings\...<SubFolders>...\'. The
> : directory does not exist or is not accessible because of security
> settings.
> :
> : Source Error:
> :
> : An unhandled exception was generated during the execution of the current
> web
> : request. Information regarding the origin and location of the exception
> can
> : be identified using the exception stack trace below.
> :
> : Stack Trace:
> :
> :
> : [HttpException (0x80004005): Server cannot access application directory
> : 'C:\Documents and Settings\...<SubFolders>...\'. The directory does not
> exist
> : or is not accessible because of security settings.]
> : System.Web.HttpRuntime.EnsureAccessToApplicationDi rectory() +72
> : System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +264
> :
> : [HttpException (0x80004005): ASP.NET Initialization Error]
> : System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +990
> : System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +128
> :
> : --------------------------------------------------------------------------------
> : Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
> ASP.NET
> : Version:1.1.4322.2032
> :
> : Does anyone know what could be the problem???
> :
> : Can anyone provide any assistance to resolve it???
> :
> : --
> : ...Yogesh
> : "If a pig loses its voice, is it disgruntled???"
>
>
>Yogesh Pancholi Guest
-
Ken Schaefer #5
Re: Permissions Issues With ASPNET Account
a) Try putting the files somewhere else (e.g. in a new folder you create on
your c: drive *not* underneath your profile). If everything starts working,
then you can be pretty sure that ACLs are involved somehow.
b) If you want to troubleshoot the issue further, use Filemon from
[url]www.sysinternals.com[/url] and locate Access Denied errors for the ASPNET account.
That will tell you what specific file/folder is being denied access and you
can adjust ACLs appropriately. However, I would suggest that option (a) will
cause you less grief/effort going forward.
Cheers
Ken
--
Blog: [url]www.adopenstatic.com/cs/blogs/ken/[/url]
Web: [url]www.adopenstatic.com[/url]
"Yogesh Pancholi" <YogeshPancholi@discussions.microsoft.com> wrote in
message news:BA73DB57-D110-426F-9A98-25B57E235EEB@microsoft.com...
: Thank you, Ken, for your response.
:
: The ASP.NET application resides in a subfolder under my own user profile,
to
: which I have granted permissions (ie. Read, Read & Execute, and List
Folder
: Contents) to the ASPNET user account. Further, the application subfolder
: resides underneath the "Visual Studio Projects" folder created when VS
2003
: was installed.
:
: The funny thing is, this problem has literally started occurring "out of
the
: blue". I was able to browse to the application on Friday, but could not do
so
: on Monday. I swear there was nothing
added/changed/removed/configured/..etc.
: during the weekend. It just doesn't make sense why it suddenly stopped
: working. As I mentioned in the original note, if I elevate the application
: credentials to 'SYSTEM' in the machine.config file, then everything works
: fine, but decreasing back to 'MACHINE' (ie. using ASPNET account), then it
: doesn't work.
:
: ...Yogesh
:
:
: "Ken Schaefer" wrote:
:
: > Hi,
: >
: > The folders under "c:\documents and settings" are ACLed so that only the
: > user (and Administrators) can access those files. It seems that your
: > application wishes to access some file or folder underneath some user's
: > profile (you have obscured the actual directory structure in your post),
but
: > the ASPNET user won't have access to that unless either you place it
into
: > the Administrators group -or- it's the ASPNET user account's folder.
: >
: > Cheers
: > Ken
: >
: > --
: > Blog: [url]www.adopenstatic.com/cs/blogs/ken/[/url]
: > Web: [url]www.adopenstatic.com[/url]
: >
: >
: > "Yogesh Pancholi" <YogeshPancholi@discussions.microsoft.com> wrote in
: > message news:AD9A7E8C-FEAD-40FD-BE45-C7062B8B39C0@microsoft.com...
: > : For some unexplained reason, I am suddenly unable to browse to a
virtual
: > : directory on my laptop. I have a number of sample websites to which I
: > could
: > : happliy browse up until last week. As of Monday, if I browse to any of
the
: > : sites, I get an HttpException saying "The directory does not exist or
is
: > not
: > : accessible because of security settings." I honestly have not changed
: > : anything at all.
: > :
: > : I have checked and re-checked that ASPNET indeed has the three
required
: > : permissions on the virtual directories (ie. Read, Read & Execute, and
List
: > : Folder Contents). As a workaround, the only way that I am able to
: > currently
: > : browse to the sample websites is I 'upgrade' the access level
privilege in
: > : the machine.config as follows:
: > :
: > : Go to folder C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG, and
edit
: > the
: > : machine.config file. Find <processModel enable="true"
: > timeout="Infinite"....
: > : and change the username attribute from 'machine' to 'system'. Save the
: > file,
: > : and restart IIS.
: > :
: > : I have trawled the internet in the last couple of days, and have
: > discovered
: > : many others have experienced the same problem. For most, it was a
matter
: > of
: > : applying the ASPNET account permissions to the virtual folder, but
there
: > are
: > : still a number of other people (like myself) for whom this problem
: > persists.
: > : I have even ran aspnet_regiis.exe, but still no joy.
: > :
: > : My system specification is as follows:
: > :
: > : Windows XP Professional SP1.
: > : Internet Explorer 6.0.2800 SP2.
: > : .NET Framework v1.1
: > : Visual Studio .NET 2003
: > :
: > : Below is the exception:
: > :
: > : Server Error in '/EC315CH02' Application.
: >
: --------------------------------------------------------------------------------
: > :
: > : Server cannot access application directory 'C:\Documents and
: > : Settings\...<SubFolders>...\'. The directory does not exist or is not
: > : accessible because of security settings.
: > : Description: An unhandled exception occurred during the execution of
the
: > : current web request. Please review the stack trace for more
information
: > about
: > : the error and where it originated in the code.
: > :
: > : Exception Details: System.Web.HttpException: Server cannot access
: > : application directory 'C:\Documents and Settings\...<SubFolders>...\'.
The
: > : directory does not exist or is not accessible because of security
: > settings.
: > :
: > : Source Error:
: > :
: > : An unhandled exception was generated during the execution of the
current
: > web
: > : request. Information regarding the origin and location of the
exception
: > can
: > : be identified using the exception stack trace below.
: > :
: > : Stack Trace:
: > :
: > :
: > : [HttpException (0x80004005): Server cannot access application
directory
: > : 'C:\Documents and Settings\...<SubFolders>...\'. The directory does
not
: > exist
: > : or is not accessible because of security settings.]
: > : System.Web.HttpRuntime.EnsureAccessToApplicationDi rectory() +72
: > : System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +264
: > :
: > : [HttpException (0x80004005): ASP.NET Initialization Error]
: > : System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +990
: > : System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr)
+128
: > :
: >
: --------------------------------------------------------------------------------
: > : Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
: > ASP.NET
: > : Version:1.1.4322.2032
: > :
: > : Does anyone know what could be the problem???
: > :
: > : Can anyone provide any assistance to resolve it???
: > :
: > : --
: > : ...Yogesh
: > : "If a pig loses its voice, is it disgruntled???"
: >
: >
: >
Ken Schaefer Guest



Reply With Quote

