Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.
Posted

1 solution

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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900