Multimedia
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsWeb DesignMultimedia

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old May 7th, 2004, 10:43 AM
smcroy smcroy is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 smcroy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Adobe Reader and SSL

From within a SSL session a user can request to view the current information as a PDF document. In response the PDF document is streamed to the browser using ASP response.contenttype="application/pdf" followed by response.binarywrite binarydatastream.

The user is presented with a dialog indicating that they are leaving a secure area before the PDF viewer displays the PDF document in their browser.

Is there any way to avoid the 'leaving a secure area' message?

Reply With Quote
  #2  
Old June 3rd, 2004, 09:36 AM
squighound squighound is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 3 squighound User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by smcroy
From within a SSL session a user can request to view the current information as a PDF document. In response the PDF document is streamed to the browser using ASP response.contenttype="application/pdf" followed by response.binarywrite binarydatastream.

The user is presented with a dialog indicating that they are leaving a secure area before the PDF viewer displays the PDF document in their browser.

Is there any way to avoid the 'leaving a secure area' message?
I did find a way to get around this, but it creates other problems...

Basically, add the following line after your "response.contenttype..." line:

Response.AddHeader("accept-ranges", "bytes")

This will tell the browser to "accept" byte data, so it won't pop up the "unsecure" message. However, in my case this causes my page_load event to call twice! So everything takes twice as long to run, and generates twice the database inserts, etc...

Anyone have a solution to this?

Thanks,
Squighound



Reply With Quote
  #3  
Old April 4th, 2005, 12:33 PM
Jason Dimmick Jason Dimmick is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 Jason Dimmick User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 10 sec
Reputation Power: 0
Poor Monday Morning Testing

Almost a year later, I hope you found the solution for this problem, but seeing as no one posted a response.
I was having this exact problem trying to display reports from reporting services as pdfs. The application would call the page load/Page_Load method twice. Now I was working on this late Friday night and thought that I had not resolved the problem, but when I came in this morning it seems to be working fine. Maybe it was that dancing guy that wanted my first born? What was his name again?
What I think fixed the problem was setting the contentType=application/pdf property on the page.

Nevermind this didn't seem to help either just bad Monday morning testing.

Last edited by Jason Dimmick : April 4th, 2005 at 01:03 PM. Reason: False results

Reply With Quote
  #4  
Old April 4th, 2005, 02:54 PM
Jason Dimmick Jason Dimmick is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 Jason Dimmick User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 10 sec
Reputation Power: 0
WARNING! This is a Hack solution

Ok, let me start by saying I'm not proud of this, but it works.
I found a property that changes between the two page load events in the Request object. If you just return nothing for the first event the page just returns nothing so you must return some sort of pdf in order to make the page load twice. So, I created a small pdf. Wrote a small app to read out its bytes. Created a property byte[] property of those bytes. I then test for the Request property that I know changes, to see if it is the first time through. If it is the first time through I send back the small PDF that I have stored as a byte array. If not I return the results from reporting services.

I plan on placing a global variable in the test. That way if for some reason this problem is fixed in a future version of IIS it will mean just changing a setting somewhere.

Reply With Quote
Reply

Viewing: ASP Free ForumsWeb DesignMultimedia > Adobe Reader and SSL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway