Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
The best choice for your web site host, email hosting, and domain registration.
 


  Sponsors  

Meet Our Sponsors

R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Cache-Control
Previous Previous
 
Next Next
New Post 4/30/2007 12:00 PM
User is offline Matthew Richards
8 posts
10th Ranked


Cache-Control 

I'm trying to develop a module that allows users to search, store metadata, upload and retrieve documents (files of all types) from the database.  It works fine, except when the user attempts to "Open" the document in a separate application (not inline with the browser).  The application displaying the document (acrobat or word, for example) will return an error that the file can't be found after it's downloaded from the module.  I verified the file doesn't exist in the temporary internet files.  If the user saves the file or if I change the Content-Disposition from application to inline, the file is saved or displayed correctly.  After searching for a solution to this, I found a KB article at Microsoft explains Cache-Control and why I can't open a document with Cache-Control set to Private or no-cache.  This makes sense, I don't want my bank account information stored in my temporary internet files.  When I try adding any of the following lines, as suggested by the KB article, and use an HTTP Logger, the result is always setting the Cache-Control to no-cache.

Response.AppendHeader("Pragma", "Public")
Response.AppendHeader("Cache-Control", "Public") 
or

Response.AppendHeader("Pragma", "")
Response.AppendHeader("Cache-Control", "") 

Is DotNetNuke overriding my settings when the page is rendered?  Has anyone experienced this?  Any help would be greatly appreciated.

Thanks,

Matt


Matthew Richards
US Army Engineering Research and Development Center
 
New Post 8/26/2007 4:19 AM
User is offline tudordumitriu
4 posts
10th Ranked


Re: Cache-ControlHi 

Hi there.

I don't know if you did or did not find the answer to your search (I'm pretty sure you did), but maybe this will help other persons.

The idea is that by default the Response had set the "no-store" attribute, and because of this imediatly after open and download the document is deleted from Temporary Internet Files.

So what you have to do is response.ClearHeaders() before setting your own attributes.

For more information ckeck how the DNN team did it: Library\Components\FileSystem\FileSystemUtils.vb

Keywords: can't open downloaded files

 

Happy coding

 
New Post 8/26/2007 1:17 PM
User is offline Zymm
3 posts
10th Ranked


Re: Cache-Control 

Cache control is a complicated subject and like a lot of other stuff, the default IIS options don't provide an extensive/consolidated place to control all the possible options from.

Try CacheRight from Port80 at http://www.port80software.com/products/cacheright/

Theres a 30 day trial so there's nothing to lose by trying..
We've got basically all the other Port80 products installed on our server and swear by them.  Last week I realized our Cache stuff wasnt being taken care of so I bought Cacheright too, and voila, I have an organized scheme for cache control, at a granular level..  the current rule set we use is

ExpiresByType text/htm : 7 days after access public no-transform
ExpiresByType text/html : 7 days after access public no-transform
ExpiresByType image/jpeg : 6 months after access public no-transform
ExpiresByType image/jpg : 6 months after access public no-transform
ExpiresByType image/gif : 6 months after access public no-transform
ExpiresByType image/png : 6 months after access public no-transform
ExpiresByType text/css  : 6 months after access public no-transform
ExpiresByType text/js  : 14 days after access public no-transform
ExpiresByType application/x-javascript  : 14 days after access public no-transform

 

 

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Cache-Control
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Where Every Home is an Investment
Where Every Home is an Investment
www.nestbrokers.com
Faculty of Graduate and Postdoctoral Studies
At the graduate level, the University of Ottawa offers more than 180 graduate certificates, master's degrees and PhDs, as well as interdisciplinary programs such as Women's Studies and Canadian Studies. Many postdoctoral opportunities are available in both the sciences and the humanities. For further information, please consult the site of the Faculty of Graduate and Postdoctoral Studies.
www.grad.uottawa.ca
Vekkin Solutions
Vekkin Solutions provides complete website solutions and custom module development to churches and small businesses.
www.vekkin.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP