在iis 5.1中发布时无法打开PDF [英] PDF not open while publish in iis 5.1

查看:356
本文介绍了在iis 5.1中发布时无法打开PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

我现在很麻烦.我有用于订单管理的Web应用程序.当我单击已发货"按钮时,我的订单已发货,并创建一个PDF文件并存储在一个文件夹中,然后直接打开以打印此PDF.这在本地主机工作正常.当我在IIS 5.1中发布此文件时,我的pdf无法正常工作.它在文件夹中创建,但不能直接打开.

这是该代码:-

Hello Friends,

i am right now in big trouble. i have web application for order management. when i click on Shipped button my order shipped and create one PDF file and store in one folder and directly open for print this PDF. this are working fine in localhost. when i publish this in IIS 5.1 my pdf not working. it create in folder but not open directly.

here is code for that :-

System.Diagnostics.Process.Start("C:/Inetpub/wwwroot/test/FedExShipPDF/793947412770.pdf");

推荐答案

Yatin,它非常自然和基本.
如果您在服务器上执行Process.Start,它将在服务器而不是客户端上启动PDF.
请转到服务器打开的任务管理器,在进程"选项卡中检查正在运行多少个Adobe Arcobat Reader进程.

假设:您的服务器上安装了acrobat阅读器
Yatin, Its very natural and basic.
If your execute Process.Start on server it will start your PDF on your server not on your client.
Please go to your server open task manager , in processes tab check how many adobe arcobat reader process is running.

Assumption : acrobat reader is installed on your server


public void OpenWithStartInfo()
      {
          ProcessStartInfo startInfo = new ProcessStartInfo("acrobate32.exe");
          startInfo.WindowStyle = ProcessWindowStyle.Maximized;                  Process.Start(startInfo);

          startInfo.Arguments = "YourPDFPath";
          Process.Start(startInfo);

      }


这篇关于在iis 5.1中发布时无法打开PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆