I got beginners question.
How to save a file stream to a file on server?!
I got this:
var source = Request.QueryString[\"src\"];
WebClient webcli
You can use code to get the website's directory and form your own file path.
See this question for how to get the website's directory.
How to get website's physical path on local IIS server? (from a desktop app)
You need to map your server's path :
If memory serves me right, you can use something like :
HttpContext.Current.Server.MapPath("~/MyPathToSomething");
Note that the path string must start with the tilde character.
Regards
Use Server.MapPath() (also a using
block for closing the file would help):
using(FileStream os = new FileStream(Server.MapPath("/output/asdasdasd.ico"), FileMode.Create))
{
var ic = MakeIcon(iconbitmap, 16, false); /// function returns an icon
ic.Save(os);
}