473,898 Members | 3,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting NoCache causes IE/Powerpoint to fail to open

Hi,

For the last couple of releases of a product we're developing we've been
running to very wierd behavior from IE and our ASP.NET web application which
serves up various types of files and I'm getting very frustrated in trying
to solve it!

We content we are serving up is potentially sensitive and therefore we DO
NOT want it cached on the remote client (IE) beyond the lifetime of the
application rendering it (IE, Powerpoint, Word etc.). Clearly the user can
mess this up but thats another issue.

So on the request for a file we set:

Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);

- or -

Response.Cache. SetNoStore();
Response.Cache. SetNoServerCach ing();

The rest of the headers get set pretty much as you'd expect:
Response.Status Code=200;
Response.Conten tType = fileContentType ;
Response.Append Header("Content-Length", fileContentLeng th.ToString());

I've tried as many various on caching options and headers as I can think of
and I can't avoid the following behavior:

For certain types of file, like PowerPoint or Word, clicking on a file href
causes:
* IE prompt for a "what do you want to do with this file?". It has the right
type displayed and name.
* Pressing either of these options then results in a Microsoft Powerpoint
dialog saying "Could not open <fullurl>"
* Clicking ok to that dialog causes IE to display an error "could not
download <whatever.ppt > from <somehost>".
* Looking at the web logs IE does NOT execute any further calls to our
application. The only call we see is the single request for the file which
is returned.

For other types of file, like Jpegs, clicking on the href opens the file
within IE and displays the image correctly.

Right-clicking on the href and selecting "Save as" works.

Setting a context-disposition header doesn't make any difference to the
problem above. Removing the "no-cache" header and letting the private cache
expire after 0 minutes works in all cases above - but the file remains in
the machines cache - something we'd like to avoid.

One hypothesis is that IE first downloads the file to a temporary file,
deletes it (no cache), the asks the user what they want to do with it -
which of course fails (or deletes it after the user chooses before
powerpoint sees it or it can be saved).

What am I missing? Is there any way to set "no-cache" for powerpoint and
succeed in opening it once the IE "save/open" dialog appears?

Thanks
Jonathan
Nov 18 '05 #1
2 3202
In the future, you'll probably want to ask a question like this in one
newsgroup at a time, since it's unclear how many replies you've already
gotten for this question.

This is pretty lame, eh? See
http://support.microsoft.com/default...NoWebContent=1

This refers to SSL delivered documents, but I don't know of any reason this
would only affect SSL.

It's unclear what threats you're trying to mitigate here. Can you
elaborate?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.


"Jonathan Trevor" <tr****@fxpal.c om> wrote in message
news:us******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

For the last couple of releases of a product we're developing we've been
running to very wierd behavior from IE and our ASP.NET web application which serves up various types of files and I'm getting very frustrated in trying
to solve it!

We content we are serving up is potentially sensitive and therefore we DO
NOT want it cached on the remote client (IE) beyond the lifetime of the
application rendering it (IE, Powerpoint, Word etc.). Clearly the user can
mess this up but thats another issue.

So on the request for a file we set:

Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);

- or -

Response.Cache. SetNoStore();
Response.Cache. SetNoServerCach ing();

The rest of the headers get set pretty much as you'd expect:
Response.Status Code=200;
Response.Conten tType = fileContentType ;
Response.Append Header("Content-Length", fileContentLeng th.ToString());

I've tried as many various on caching options and headers as I can think of and I can't avoid the following behavior:

For certain types of file, like PowerPoint or Word, clicking on a file href causes:
* IE prompt for a "what do you want to do with this file?". It has the right type displayed and name.
* Pressing either of these options then results in a Microsoft Powerpoint
dialog saying "Could not open <fullurl>"
* Clicking ok to that dialog causes IE to display an error "could not
download <whatever.ppt > from <somehost>".
* Looking at the web logs IE does NOT execute any further calls to our
application. The only call we see is the single request for the file which
is returned.

For other types of file, like Jpegs, clicking on the href opens the file
within IE and displays the image correctly.

Right-clicking on the href and selecting "Save as" works.

Setting a context-disposition header doesn't make any difference to the
problem above. Removing the "no-cache" header and letting the private cache expire after 0 minutes works in all cases above - but the file remains in
the machines cache - something we'd like to avoid.

One hypothesis is that IE first downloads the file to a temporary file,
deletes it (no cache), the asks the user what they want to do with it -
which of course fails (or deletes it after the user chooses before
powerpoint sees it or it can be saved).

What am I missing? Is there any way to set "no-cache" for powerpoint and
succeed in opening it once the IE "save/open" dialog appears?

Thanks
Jonathan

Nov 18 '05 #2
Thanks for the pointer.

We're trying to avoid a user leaving copies of private documents on public
machines by accident. Clearly to do this really well you'd need some digital
rights type support (+encryption) or requiring a "trusted" viewer for
documents on that machine which you can guarantee won't leave a copy
anywhere. However, it seemed that setting "no-cache" would be a good way to
allow documents to be viewed on the machine which would then not be
available after the user had left it. If the user made the choice to
download it and then leaves it, then fine (but not good :-) )

While I understand that a temporary file must be created for ppt (etc) to
open (although what they do with webdav is more interesting) I'm not sure
why IE couldn't open powerpoint, and then cleanup after ppt exits -
presumably it does the same for itself when opening large files it can host
(like jpgs which open directly in IE). Even more annoyingly there is no way
to determine what behavior to expect from different browsers/clients - it
depends on what applications are installed, how they integrate with IE, and
even what versions are installed. For example, clicking "open" on some
machines causes powerpoint to launch and on others causes IE to host the
powerpoint document.

Finally, I'm not convinced the behavior is consistent as the "Save As"
choice will fail on the "SaveAs/Open" dialog - but if you right click on the
document link and click "Save as" from the menu then it saves without
problems!

Basically, I'd like some consistent behavior when the user clicks on
"Download this document" - i.e. it should never fail wierdly (such as "Save
As" or "Open" failures).

Jonathan

"Eric Lawrence [MSFT]" <e_********@hot mail.com> wrote in message
news:eD******** ********@TK2MSF TNGP10.phx.gbl. ..
In the future, you'll probably want to ask a question like this in one
newsgroup at a time, since it's unclear how many replies you've already
gotten for this question.

This is pretty lame, eh? See
http://support.microsoft.com/default...NoWebContent=1
This refers to SSL delivered documents, but I don't know of any reason this would only affect SSL.

It's unclear what threats you're trying to mitigate here. Can you
elaborate?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

"Jonathan Trevor" <tr****@fxpal.c om> wrote in message
news:us******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

For the last couple of releases of a product we're developing we've been
running to very wierd behavior from IE and our ASP.NET web application

which
serves up various types of files and I'm getting very frustrated in trying to solve it!

We content we are serving up is potentially sensitive and therefore we DO NOT want it cached on the remote client (IE) beyond the lifetime of the
application rendering it (IE, Powerpoint, Word etc.). Clearly the user can mess this up but thats another issue.

So on the request for a file we set:

Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);

- or -

Response.Cache. SetNoStore();
Response.Cache. SetNoServerCach ing();

The rest of the headers get set pretty much as you'd expect:
Response.Status Code=200;
Response.Conten tType = fileContentType ;
Response.Append Header("Content-Length", fileContentLeng th.ToString());

I've tried as many various on caching options and headers as I can think

of
and I can't avoid the following behavior:

For certain types of file, like PowerPoint or Word, clicking on a file

href
causes:
* IE prompt for a "what do you want to do with this file?". It has the

right
type displayed and name.
* Pressing either of these options then results in a Microsoft Powerpoint dialog saying "Could not open <fullurl>"
* Clicking ok to that dialog causes IE to display an error "could not
download <whatever.ppt > from <somehost>".
* Looking at the web logs IE does NOT execute any further calls to our
application. The only call we see is the single request for the file which is returned.

For other types of file, like Jpegs, clicking on the href opens the file
within IE and displays the image correctly.

Right-clicking on the href and selecting "Save as" works.

Setting a context-disposition header doesn't make any difference to the
problem above. Removing the "no-cache" header and letting the private

cache
expire after 0 minutes works in all cases above - but the file remains in the machines cache - something we'd like to avoid.

One hypothesis is that IE first downloads the file to a temporary file,
deletes it (no cache), the asks the user what they want to do with it -
which of course fails (or deletes it after the user chooses before
powerpoint sees it or it can be saved).

What am I missing? Is there any way to set "no-cache" for powerpoint and
succeed in opening it once the IE "save/open" dialog appears?

Thanks
Jonathan


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6360
by: Ryan | last post by:
PowerPoint.Application cannot open PPT file I am trying to use the following code using to open a PPT file using VS.NET 2003 and PowerPoint 2003 Option Strict Off Imports System.Runtime.InteropServices Imports Microsoft.Office.Interop Imports Microsoft.Office.Interop.PowerPoint Imports Microsoft.Office.Core Imports Microsoft.Office.Core.MsoControlType
2
10224
by: WillRead | last post by:
I have a VB.Net application and a PowerPoint presentation explaining how each form in the application works, etc.. I would like to select and display the slide appropriate for each form by pressing the F1 key. In other words, I want to use the powerpoint presentation for my help system. I am calling the SlideShow from the applications menu, and it works great; however, the same techniques are not working for selecting individual slides. ...
4
42170
by: Joseph | last post by:
I am trying to open a 3 powerpoint presentation simultaneously afte each other without interruption, the operator of the application doe not need to notice anything or interfere in the operation of th transition between the 3 presentations. Let us say I have three powerpoint presentation Presentation 1 Presentation 2, and Presentation 3. I like to fire them from a window form on the click event of a butto on the form. The sequence of...
0
2562
by: Marc Eggenberger | last post by:
Hi there. I have an webapp (asp.net) which should use powerpoint to create a presentation and then send that presentation to the user. I'm using VS2003 and Office2003 (project req.). The webapp runs find but when I try to open powerpoint in my asp.net code I get an error
8
7087
by: Rut | last post by:
Does anyone know how to start powerpoint from vb.net without the ppt screen appearing. I want to keep it hidden? Using this code: Try pp = New PowerPoint.Application pp.Visible = Office.MsoTriState.msoTrue pp.WindowState = PowerPoint.PpWindowState.ppWindowMinimized Application.DoEvents()
1
6528
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
35
13722
by: gill1978 | last post by:
Hi, What I'm trying to do is, once the users select the files they want to merge, they select a button which will: 1. Open an instance of powerpoint 2. Open the first of the files selected by the user 3. Copy/ export that slides from that presentation 4. Paste into the instance of powerpoint (in point 1 above)
8
2169
by: =?Utf-8?B?R2VvcmdlQXRraW5z?= | last post by:
Greetings! I wrote a small Exe that simply runs Shell to load PowerPoint and launch a particular file, depending on the day of the week. However, it was set up for office 2003 (I naively hardcoded the path) and I also used Shell. Does anybody have a snipped showing a more efficient method for launching a Powerpoint file, regardless of which version of Office is running? My current, ineffecient code: Sub main() Try
1
11921
by: chrizstone | last post by:
Hi Guys, What i want to do is: I want to create a Slide programmatically where a Table is on it! Here´s my Code: String strTemplate; strTemplate = template; String tableSlide = @"C:\Temp\TableSlide_" + guid.ToString();
0
9992
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11254
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10853
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10480
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8034
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7187
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5876
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.