This project is read-only.

Can't add images to posts in BlogEngine.

Topics: ASP.NET 2.0
Sep 25, 2012 at 3:47 PM

I'm probably doing something silly, but each time I try to  add an image to  a post, I get this error just after browsing to it, and click the Upload button.  The image is a .jpg with a simple enough name, and it's in the root of my c drive.  I am trying to do this from a computer which is not the iis server running the blog, but I assume that that is not a problem.

[NotSupportedException: The given path's format is not supported.]
   System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath) +12657336
   System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath) +165
   System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +112
   System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +38
   System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path) +92
   System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath) +133
   BlogEngine.Core.Providers.XmlFileSystemProvider.FileExists(String VirtualPath) in J:\Projects\BlogEngine_2_6_0_5\Source\BlogEngine\BlogEngine.Core\Providers\FileSystemProviders\XmlFileSystemProvider.cs:218
   BlogEngine.Core.Providers.XmlFileSystemProvider.UploadFile(Byte[] FileBinary, String FileName, Directory BaseDirectory, Boolean Overwrite) in J:\Projects\BlogEngine_2_6_0_5\Source\BlogEngine\BlogEngine.Core\Providers\FileSystemProviders\XmlFileSystemProvider.cs:258
   BlogEngine.Core.Providers.BlogService.UploadFile(Stream FileStream, String FileName, Directory BaseDirectory, Boolean Overwrite) in J:\Projects\BlogEngine_2_6_0_5\Source\BlogEngine\BlogEngine.Core\Providers\BlogService.cs:795
   Admin.Posts.AddEntry.BtnUploadImageClick(Object sender, EventArgs e) +207
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707

Sep 26, 2012 at 8:00 PM

You said it has a simple enough name, but that first line is odd. I'm also curious about the full path that you have BE installed to. I wonder if it's too long for IIS/the system to recognize?

Sep 26, 2012 at 8:17 PM

On the server, the BE files are all in C:\Inetpub\wwwroot\Blog .  The path/file name on the computer I'm trying to add from is just C:\a0.jpg , but it doesn't seem to make any difference what I change it to.

Oct 27, 2012 at 1:26 PM
Edited Oct 27, 2012 at 1:33 PM

I am also having this problem. I just moved my site to a new machine. I am not running the full source version, just the BlogEngine.Web download. I had no issues doing this on the other computer. Any help is greatly appreciated.

Additional information: I am running all of this on a Windows 7 Ultimate laptop. I am using SQL Server 2008 R2 as my storage mechanism.

Is it possible it is a rights issue on the new machine?

Oct 27, 2012 at 7:17 PM
cheyes wrote:

Is it possible it is a rights issue on the new machine?

Check what application pool BE uses in IIS, it should be .net 4.0 integrated, and look up identity that runs this pool. It can be "Network Services" or something else. You'll need to add this user write permission on app_data folder.