This project is read-only.

Configuration of UNCBlogProvider

May 14, 2012 at 1:51 PM

What is the configuration value for the UNCBlogProvider? The comments indicate that it should be a UNC path. No combination of local path, unc path or ~/ path to App_Data or App_Data/files is working.

May 15, 2012 at 1:22 PM

It's probably a permissions issue.  I just tested it myself for the first time (I should have tested it before..!).  At first, I was getting the following error when starting the application:

storageVariable (as unc path) does not exist. or does not have read\write permissions

And it was highlighting the UNC provider line in the web.config file.  The UNC path I was trying to access was on my own machine and a folder share named "J".  It looks like this:

<add storageVariable="\\seven02\J\Projects\BlogEngine.NET\files"
description="UNC Path Provider" name="UNCBlogProvider"
type="BlogEngine.Core.Providers.UNCFileSystemProvider, BlogEngine.Core" />

Looking at the code, System.Directory.IO.Exists was returning false.  I'm running this in IIS and the application pool identity is Network Service.  I initially gave Network Service full permissions on the "files" folder (last part of the UNC path above), and that wasn't enough.  I ended up needing to also give full permissions to Network Service on the "J" shared folder.  Depending on what UNC path you are trying to access, and what account your application is running under, the permissions may differ.  After the application starting running, I was able to Upload an image in a post, and it saved it in the UNC path, and the image handler (image.axd) was also able to serve the image from the UNC path.