Solved

Response to show PDF file cache problem

Posted on 2011-09-15
2
280 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
2 Comments
 
LVL 15

Accepted Solution

by:
pateljitu earned 250 total points
Comment Utility
Can you try these please:

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

Author Closing Comment

by:Marcelo Camarate
Comment Utility
Hi pateljitu,

The application is working fine now.

Regards, Camarate
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now