Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Access to the path Access to the path '\Cache\Modules\' is denied (DNN 5.2.1 upgrade)
Previous
 
Next
New Post
2/23/2010 1:20 PM
 

Alex Shirley wrote:

All getting the '\Cache\Modules\" issue....
Please state full DNN version and hosting provider. I'm paricularly interested in 5.2.3 installations.
If you use Plesk please let us know as well.
Thanks....

 
Alex I'm in the same boat, 5.2.3, using HELM, but DNN was installed manually. 5.2.2 didn't seem to result in the error, recent up grade to 5.2.3 now has the issue

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
2/23/2010 9:14 PM
 
We are seeing the error "Access to the path '\Cache\Modules\' is denied." in two separate DNN installations... One Upgrade Install from 5.2.2 to 5.2.3, and one New Install of 5.2.3. both running at hosting provider Web24 (in Australia) with PLESK. :(
 
New Post
2/24/2010 2:42 AM
 

I'm seeing this in a 5.2.3 install on 64 bit windons 2003 using plesk. 

I've also seen it in my development environment while running debug (5.2.1 I think) - the problem is that there is no portalSettings context when the schedule thread executes.  I would expect this to be the case when a scheduled event is running on timer mode rather that request mode.  ON timer mode there is no portalSettings object to use. 

It's in the 'FileProvider.vb' file, about line 77 :

        Private Shared Function GetCacheFolder() As String
            Dim cacheFolder As String = String.Concat(PortalController.GetCurrentPortalSettings.HomeDirectoryMapPath, "\Cache\Modules\")
            If Not Directory.Exists(cacheFolder) Then
                Directory.CreateDirectory(cacheFolder)
            End If
            Return cacheFolder
        End Function

The simple solution / workaround is to do a check for a valid portalSettings object before trying to get the homedirectorymappath.  If it's not valid, some other method will have to be used to determine the current home directory for the portal, or just skip the caching step.  You can get the home directory of the portal with this code:

PortalInfo portal = pc.GetPortal(portalId);
DotNetNuke.Common.Globals.ApplicationPath + "/" + portal.HomeDirectory + "/";

However, eagle-eyed readers will note that you can't easily tell which portal you're using when there is no context to set it in.  In other words - in the absence of a request with a domain in it, how do you know which portal to use?  The answer is that the scheduled item must specify the portal id in some way.  I suspect this might be getting a bit complicated in some cases, or at the very least the GetCacheFolder might need an overload to accept the portalId.

Creating the directory doesn't fix the problem because that's not what the error is.  The error is that PortalController.GetCurrentPortalSettings is null when a scheduled event runs on timer mode, and not on request mode.  That's my theory anyway - I haven't fully tested it - been too busy with other issues.

Note: this blog post might make for enlightening reading on the subject

http://www.ifinity.com.au/Blog/EntryI...

(edits : added code and Url to blog post)

 
New Post
2/24/2010 3:44 PM
 

Try this for a workaround (only if your hosting mum will let you):

Create empty folder if it is not there already: C:\Cache\Modules
Make sure both folders are set to read only for network service etc.

I'd be interested to see if this works ... one good report so far.

Thanks...



Alex Shirley


 
New Post
2/24/2010 3:56 PM
 

Just thought I'd add - please be aware of the security implications of doing this.... lock down that folder.



Alex Shirley


 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Access to the path Access to the path '\Cache\Modules\' is denied (DNN 5.2.1 upgrade)


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out