I am using my own code to upload images to a folder called /Portals/0/images/logos/
What is interesting is this:
Restart Website on server 2008
If I upload with the host account it works. Then I try to upload with another superuser account and it does not work. Then I try to upload with the host account again and it does not work.
The host account and the other super user account are both tried from the same Computer but one is using FireFox and the other IE 7.
The error is located below:
Method: System.Security.Util.StringExpressionSet.CanonicalizePath
StackTrace:
Message: System.NotSupportedException: The given path's format is not supported. at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath) at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath) at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, AccessControlActions control, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) at 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) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at Portals_0_PortfolioManagementSystem_PortfolioManagementSystem.SaveLogo_Click(Object sender, EventArgs e) in C:\WebSites\websitename\Portals\0\PortfolioManagement\PortfolioManagementSystem.aspx.vb:line 157
LINE: 157 is this:
LogoFile.PostedFile.SaveAs(System.Configuration.ConfigurationManager.AppSettings("Portfolio.Image.Location").ToString() & strFileName)