Мне нужно, чтобы программа специально сохраняла файлы, динамически созданные на диске C: \ клиентской системы.
Я попробовал следующий код
context.Response.ContentType = "text/plain";
context.Response.AppendHeader("Content-Disposition", "attachment; filename= "TextExport");
string path=@"C:\TestFolder";
Response.TransmitFile(path);
try
{
context.Response.End();
}
catch (Exception ex)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "ExMessage", "alert('" + ex.ToString() + "')", true);
}
finally
{
this.Dispose();
}
Во время отладки я получил исключение о том, что доступ запрещен.
Что мне делать? Я специально хочу сохранить на C Drive