Server file system write permissions error

asp.net Singapore
  • 13 years ago
    Hello members
    I have a problem
     
    Code: 1
     
    ItemThumbNail = System.Drawing.Image.FromFile(this.inputThumbnail.PostedFile.FileName);
     
    ItemThumbNail is an object of System.Drawing.Image
    now when i create a new ItemThumbNail from the file inputThumbnail (this is the html file input on my web browser) it create a ItemThumbNail image file on server using this image from the client system. its working fine on the local system, but i am facing this problem when i am trying to do the same on server.
     
    is this a some write permission error because on the other hand code
     
    Code: 2
    this.inputThumbnail.PostedFile.SaveAs(Server.MapPath("../show/thumbnails/" + this.lblItemID.Text + "tn" + strItemThumbExtension));
     
    is working fine.
     
    What I know about it is that code 2 saves the file in my website folder some where but code 1 try to create an image for some purpose in the file system where the asp.net framework is.
     
    Plz help
     
    Aloha

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programs must be written for people to read, and only incidentally for machines to execute.”