byte[] fileContentByte = new byte[10240]; // 文件内容二进制
#region 将文件转成二进制
FileStream fs = new FileStream("fastreport\\" + templateName, FileMode.Open, FileAccess.Read);
fileContentByte = new byte[fs.Length]; // 二进制文件
fs.Read(fileContentByte, 0, Convert.ToInt32(fs.Length));
fs.Close();
#endregion
string postDate = "fileContentByte=" + HttpUtility.UrlEncode(fileContentByte) + "&templateName=" + HttpUtility.UrlEncode(templateName) + "&saveCookies=None";
string url = ConfigurationManager.AppSettings["logUrl"].ToString().Replace("cslogin.action?", "cstemplate.action");
//_log.Info("读到数据,postDate" + postDate + ",url:" + url);
String sendok=PostWebRequest(url, postDate);
if (sendok.Contains("true"))
{
MessageBox.Show("上