Access to the path is denied

  • Thread starter Theerachet Pratoommanee
  • Start date
T

Theerachet Pratoommanee

This is error message I've got. Any suggestion would be appreciated.

Server Error in '/WebDirectory' Application.


----------------------------------------------------------------------------
----

Access to the path "CreateFolder" is denied.

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.UnauthorizedAccessException: Access to the path
"CreateFolder" is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the
boxes for the desired access.

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:



[UnauthorizedAccessException: Access to the path "aaaaa" is denied.]

System.IO.__Error.WinIOError(Int32 errorCode, String str) +393

System.IO.Directory.InternalCreateDirectory(String fullPath, String
path) +632

System.IO.DirectoryInfo.CreateSubdirectory(String path) +78

AJF_Conference.Conf_WebConf_Add.CloneFile_ConfRoom()

AJF_Conference.Conf_WebConf_Add.btSave_Click(Object sender,
EventArgs e)

Indigy.WebCore.UI.WebControls.IndigyToolbarButton.OnClick(EventArgs
e) +20


Indigy.WebCore.UI.WebControls.IndigyToolbarButton.RaisePostBackEvent(String
eventArgument) +59

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18

System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+138

System.Web.UI.Page.ProcessRequestMain() +1277
 
S

Sachin Kharsani[MSFT]

Hi,
I think that the error message is itself self explanatory.
What it says is that by default the aspnet_wp.exe process runs under a the
security context of the ASPNet account. This account is not having access
permissions on the file system. So you need to either give access
permissions to the ASPNet account (which I would not recommend) or you need
to make the request run under another users security context.

I hope I understood the question correctly .

Sachin Kharsani
Microsoft Premier Support


--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
This posting is provided "AS IS" with no warranties, and confers no rights.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Theerachet Pratoommanee said:
This is error message I've got. Any suggestion would be appreciated.

Server Error in '/WebDirectory' Application.


-------------------------------------------------------------------------- --
----

Access to the path "CreateFolder" is denied.

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.UnauthorizedAccessException: Access to the path
"CreateFolder" is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the
boxes for the desired access.

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:



[UnauthorizedAccessException: Access to the path "aaaaa" is denied.]

System.IO.__Error.WinIOError(Int32 errorCode, String str) +393

System.IO.Directory.InternalCreateDirectory(String fullPath, String
path) +632

System.IO.DirectoryInfo.CreateSubdirectory(String path) +78

AJF_Conference.Conf_WebConf_Add.CloneFile_ConfRoom()

AJF_Conference.Conf_WebConf_Add.btSave_Click(Object sender,
EventArgs e)

Indigy.WebCore.UI.WebControls.IndigyToolbarButton.OnClick(EventArgs
e) +20


Indigy.WebCore.UI.WebControls.IndigyToolbarButton.RaisePostBackEvent(String
eventArgument) +59

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18

System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+138

System.Web.UI.Page.ProcessRequestMain() +1277





-------------------------------------------------------------------------- --
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top