docx файлы и transmitfile
От: killerm Украина www.evector.net
Дата: 29.04.11 19:24
Оценка:
просто отдаю файл, сохраняю. потом пытаюсь его открыть и пишет файл порченный. хотя один в один совпадает с исходным.Подскажите, что я делаю не так.
вот коз из странички

Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
Response.AppendHeader("Content-Disposition", "attachment; filename=test222.docx");
string _doc2 = @"D:\ipc\Templates\empty2.docx";
Response.AddHeader("Content-Length", new System.IO.FileInfo(_doc2).Length.ToString());
Response.TransmitFile(_doc2);
Response.Flush();
Response.Close();
Response.End();
Re: docx файлы и transmitfile
От: killerm Украина www.evector.net
Дата: 03.05.11 11:41
Оценка:
Если кому интерестно
Anyway, I did a bit of searching, but to no avail. Then I checked the properties of one of the documents, (right-click the document in Windows Explorer, and then click Properties), and at the bottom of the General tab of the Properties dialog box, next to the Security label, the following description is displayed:
This file came from another computer and might be blocked to help protect this computer.
All I had to do then was to click the Unblock button next to the description; bloody simple.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.