Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Win2003 C# ASP.NET SQL-Server IIS , +
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 28-Sep-12 23:35pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 525
1 Maciej Los 319
2 BillWoodruff 174
3 Suraj Sahoo | Coding Passion 170
4 /\jmot 152
0 OriginalGriff 8,654
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,229
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 29 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100