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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Image Upload issueImage Upload issue
Previous
 
Next
New Post
2/19/2009 2:02 PM
 

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)

 

 
New Post
2/20/2009 9:14 AM
 

I would examine value produced by the expression:

System.Configuration.ConfigurationManager.AppSettings("Portfolio.Image.Location").ToString() & strFileName

to see if it is a valid, fully qualified physical path (not a relative path), that it is within the web site's file space, and that the folder into which the image is to be saved has write permission for the ASP.Net worker process/Network Service account, etc.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Image Upload issueImage Upload issue


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