Solved

Response to show PDF file cache problem

Posted on 2011-09-15
2
287 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 250 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 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