说明:本地运行一切正常。可以生成。发布到服务器2003上面 文件上传可以,但是SWF文件并没有生成。也没有报错。
查了以下资料 设置过了还是不行
在Windows xp系统下请把aspnet账号(如果是vista,则是networkservice)添加至administrators组,并重启iis admin服务。
在 windows server 2003下不用说了吧。一样是 networkservice 并重启iis admin服务
public void shengSwf(string a, string b)
{ Process process = new Process(); //创建进程对象
//try
//{
ProcessStartInfo startInfo = new ProcessStartInfo();
string paperroot = @"F:\FlashAnzhuang\FlashPrinter.exe";//@"F:\FlashAnzhuang\FlashPrinter.exe";
string docFile = Server.MapPath("Files\\" + a);
string swfFile = Server.MapPath("Files\\" + b); startInfo.FileName = paperroot;
startInfo.Arguments = docFile + " -o " + swfFile;
startInfo.UseShellExecute = false; //不使用系统外壳程序启动
startInfo.RedirectStandardInput = false; //不重定向输入
startInfo.RedirectStandardOutput = false; //重定向输出
startInfo.CreateNoWindow = true; //不创建窗口
process.StartInfo = startInfo; process.Start();
Response.Write("已经提交生成。<br />");
Response.Write(paperroot + "<br />" + docFile + " = " + swfFile);
//}
//catch (Exception ex)
//{
// Response.Write(ex.Message);
//}
//finally
//{
if (process != null)
process.Close(); // Response.Write("<br />finally");
//} }
查了以下资料 设置过了还是不行
在Windows xp系统下请把aspnet账号(如果是vista,则是networkservice)添加至administrators组,并重启iis admin服务。
在 windows server 2003下不用说了吧。一样是 networkservice 并重启iis admin服务
public void shengSwf(string a, string b)
{ Process process = new Process(); //创建进程对象
//try
//{
ProcessStartInfo startInfo = new ProcessStartInfo();
string paperroot = @"F:\FlashAnzhuang\FlashPrinter.exe";//@"F:\FlashAnzhuang\FlashPrinter.exe";
string docFile = Server.MapPath("Files\\" + a);
string swfFile = Server.MapPath("Files\\" + b); startInfo.FileName = paperroot;
startInfo.Arguments = docFile + " -o " + swfFile;
startInfo.UseShellExecute = false; //不使用系统外壳程序启动
startInfo.RedirectStandardInput = false; //不重定向输入
startInfo.RedirectStandardOutput = false; //重定向输出
startInfo.CreateNoWindow = true; //不创建窗口
process.StartInfo = startInfo; process.Start();
Response.Write("已经提交生成。<br />");
Response.Write(paperroot + "<br />" + docFile + " = " + swfFile);
//}
//catch (Exception ex)
//{
// Response.Write(ex.Message);
//}
//finally
//{
if (process != null)
process.Close(); // Response.Write("<br />finally");
//} }
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货