?
Solved

Response to show PDF file cache problem

Posted on 2011-09-15
2
Medium Priority
?
292 Views
Last Modified: 2012-05-12
Hi,

I have the follow VB.NET code in a ASP.NET page to show PDF files.

            With Response
                .RedirectLocation = "PDF"
                .Clear()
                .ClearHeaders()
                .ContentType = "application/pdf"
                .WriteFile({COMPLETE FILE NAME PATH})
                .Flush()
                .Close()
            End With

Open in new window


It work fine in the first time that I select a PDF file. But when I select a PDF file that has already been shown before, do not load it again, remains to be shown the last PDF file loaded.

How can I fix this bug?

Thanks in advance, Camarate
0
Comment
Question by:Marcelo Camarate
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
pateljitu earned 1000 total points
ID: 36546099
Can you try these please:

.AddHeader("Pragma", "no-cache");
.CacheControl = "no-cache";
.Cache.SetCacheability(HttpCacheability.NoCache)
0
 

Author Closing Comment

by:Marcelo Camarate
ID: 36548624
Hi pateljitu,

The application is working fine now.

Regards, Camarate
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question