Hi, we got error message says: "Access to the path '~/Content/Sys/newone' is denied. " whenever our application try to create a new folder in the path "~/Content/Sys/" although the ASP.NET account(Network Service) has a full permission over that path. Here is the complete error message: Access to the path '~/Content/Sys/newone' 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 '~/Content/Sys/newone' 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 and IIS 7, and the configured application pool identity on IIS 7.5) 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 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: Line 26: protected void Page_Load(object sender, EventArgs e) Line 27: { Line 28: System.IO.Directory.CreateDirectory("~/Content/Sys/newone"); Line 29: if (!ScriptManager.GetCurrent(this.Page).IsInAsyncPostBack) Line 30: LoadLogin(); please help
Is your hosting account by the chance on IIS 6 platform and has FrontPage Extensions installed? If it is, I recommend uninstalling FP Extensions since they are known for creating permissions mess. If, however, your account is on IIS 7 platform, try to increase the trust level to FULL. Please see this KB article for instructions.