This project is read-only.

error when deleting posts...

May 22, 2009 at 5:03 PM

so i fiddled with blogengine last night alot, and at first it wasnt letting me save any new posts, blogrolls, categories, etc.  i got my provider to give app_data write permissions, now it saves, but it wont let me delete.  heres the error that comes up.  any ideas?  thanks


[UnauthorizedAccessException: Access to the path 'C:\Domains\\wwwroot\BlogEnginetwo\App_Data\posts\3f8a8bb3-c59d-486b-b7fb-019964b37830.xml' is denied.]
  System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7714255
  System.IO.File.Delete(String path) +7574888
  BlogEngine.Core.Providers.XmlBlogProvider.DeletePost(Post post) +206
  BlogEngine.Core.Providers.BlogService.DeletePost(Post post) +23
  BlogEngine.Core.Post.DataDelete() +13
  BlogEngine.Core.BusinessBase`2.Update() +105
  BlogEngine.Core.BusinessBase`2.Save(String userName, String password) +122
  BlogEngine.Core.BusinessBase`2.Save() +19
  BlogEngine.Core.Web.Controls.BlogBasePage.OnPreInit(EventArgs e) +462
  System.Web.UI.Page.PerformPreInit() +31
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282

May 23, 2009 at 5:32 AM

Can you delete other items in the App_Data folder?  For instances, Pages, Profiles, Widgets?

May 23, 2009 at 6:12 AM

blogroll i can delete entries, but everything else, pages, categories, all come up with access error.

May 23, 2009 at 6:40 AM

Deleting blogroll entries isn't deleting the actual file.  It's just deleting entries within a file -- which equates to modifying a file.

This means permissions probably aren't correctly set on the App_Data folder.  I think I remember having a similar issue when setting up BE one time before.

When setting permissions, there's several different permissions that can be given.  There's a Write permission, and there's also a Modify permission.  If you go really deep into the permissions, there's even a separate Delete permission as well as a "Delete subfolders and Files" permission.

I would try to get the "Full control" permission set on the App_Data folder for the ASPNET / Network Service account.  This should allow the ASPNET / Network Service user to do everything with the App_Data folder.  Also make sure the Full control permission propagates down to sub-folders.