Create a file on the server from an aspx

From: BitmapWriter (anonymous_at_discussions.microsoft.com)
Date: 02/24/04


Date: Tue, 24 Feb 2004 09:26:11 -0800

Hi,
In an aspx I want to save a Bitmap I created from user input.
with something like :

bmp.Save("Image000.bmp", System.Drawing.Imaging.ImageFormat.Bmp);

I get the folowing error :

[ExternalException (0x80004005): Une erreur générique s'est produite dans GDI+.]
   System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
   System.Drawing.Image.Save(String filename, ImageFormat format)
   WebApplication1.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapplication1\webform1.aspx.cs:75
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain()

 Is it a Security problem ? How can I enable an aspx to create a file in the server ?

Thanks


Quantcast