This is venkat..
I have an issue when rotate images which are exist in remote system..
I have written the following code for image rotation in handler page..
The below code is not working ..Please help me on this issue as early as possible..
public void ProcessRequest(HttpContext context)
string Path = context.Request.Form["Path"];
int width = int.Parse(Convert.ToString(context.Request.Form["Width"]));
int height = int.Parse(Convert.ToString(context.Request.Form["Height"]));
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Path);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream receiveStream = response.GetResponseStream();
Image theImage = System.Drawing.Image.FromStream(receiveStream);
context.Response.ContentType = "image/jpeg";
context.Response.ContentType = "text/plain";
context.Response.Charset = "";
I was wrong. At the core, you're doing everything wrong. You need to use Server.MapPath to get the path to the file, and use that path to save it, unless your HTTPHandler is being used correctly ( to find and process a file, the URL being the src part of an img tag ).
Edited 14-Nov-12 11:33am
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)