Access to the path 'c:\inetpub\wwwroot\Data\bannedipcachedependency.config' is denied.

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
6/3/2008 3:04:30 AM
Gravatar
Total Posts 19

Access to the path 'c:\inetpub\wwwroot\Data\bannedipcachedependency.config' is denied.

 

p.s. Joe, figured out why I keep on getting error message...

 

Dear peepz,
 

I got the following error message during my installation. I already did what I underlined in the quotation below but still am not able to get over the error. In the directory mentioned below, there is only currentlog.config only, not the one mentioned below. I have checked that I have copied every single file that was in the installation folder but yet I have not find such config file.

 

Could you guys forward me the config file or advise me how to move on from here?

Access to the path 'c:\inetpub\wwwroot\Data\bannedipcachedependency.config' 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 'c:\inetpub\wwwroot\Data\bannedipcachedependency.config' 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 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 'c:\inetpub\wwwroot\Data\bannedipcachedependency.config' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +651
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1038
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +115
System.IO.StreamWriter.CreateFile(String path, Boolean append) +58
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +91
System.IO.StreamWriter..ctor(String path, Boolean append) +31
System.IO.File.CreateText(String path) +34
mojoPortal.Business.WebHelpers.CacheHelper.TouchCacheFile(String pathToCacheFile) +67
mojoPortal.Business.WebHelpers.CacheHelper.EnsureCacheFile(String pathToCacheFile) +27
mojoPortal.Business.WebHelpers.CacheHelper.GetBannedIPList() +101
mojoPortal.Web.BannedIPBlockingHttpModule.BeginRequest(Object sender, EventArgs e) +88
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

 

6/3/2008 7:49:38 AM
Gravatar
Total Posts 18439

Re: Access to the path 'c:\inetpub\wwwroot\Data\bannedipcachedependency.config' is denied.

Hi Farah,

The problem is it wants to create that file but it has not got write permission so it throws access denied error. The documentation tells you how to setup file permission. You need to make sure the aspnet user (assuming this is XP not Win 2003 server, on Win 2003 server its the IIS_WPG user who needs permission) needs read permission on the whole web folder and it needs write permission on the Data folder so it can write files there.

You could comment out the BannedIPBlockingHttpModule in the HttpModules section of Web.config to get past this error, but it will just change the error to the next thing that tries to write to the Data folder.

In Windows Explorer, you right click the Data folder and choose properties, you should then see a Security Tab, if you don't see this tab then google for XP simple file sharing to learn how to make that tab appear.

If you post any more errors or questions please indicate more about your system, like what OS and what version of MS SQL.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.