在IIS中启动后如何在Server 2003中打开PDF文件 [英] How to open PDF File in Server 2003 after hositn in IIS

查看:182
本文介绍了在IIS中启动后如何在Server 2003中打开PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,

我已经在Asp.net C#中创建了一个Web应用程序.并托管在IIS服务器中
在此Web应用程序中,我有一个Pdf文件.
此PDF文件在单独的页面中.
我有此Pdf文件的超链接(查看Pdf)

当我在下一页中单击此View Pdf Link .....时,它必须显示Pdf文件.

但是在IIS服务器中托管后未显示.

可以在我的PC上正常工作....但是在托管
后在SERVER 2003中无法显示

请帮帮我


谢谢.

Dear Friends,

I have Created a Webapplication in Asp.net C#. and hosted in IIS server
In this Web application I have a Pdf File.
This PDF file is in separate page.
I have a hyperlink(View Pdf) for this Pdf file

When i click this View Pdf Link..... in the Next page it must show Pdf File.

But it is not showing after hosting in IIS server.

It works Fine in my PC....but it not shows in SERVER 2003 after hosting

Please help me


THANKS.

推荐答案

如果您的PDF是存储在某处的二进制文件,那么您的响应标头必须包含

context.Response.AddHeader("Content-Type","application/pdf");

如果您的PDF作为webapp的一部分存在并且作为服务器的文件提供,请检查IIS设置中允许的扩展名
If your PDF is binary file stored somewhere then your response header must contain

context.Response.AddHeader("Content-Type", "application/pdf");

If your PDF is present as part of the webapp and served as file from the server checked for the allowed extensions in the IIS settings


这篇关于在IIS中启动后如何在Server 2003中打开PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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