?
Solved

BinaryWrite and SSL

Posted on 2003-03-24
19
Medium Priority
?
400 Views
Last Modified: 2012-05-04
I'm creating a PDF file on the fly and feeding it to the browser using BinaryWrite. The website is secure (runnng SSL) and when the page displays it pops up the message:

"This page both secure and non-secure items. Do you want to display the non-secure items?"

How can i make sure the binary feed u=is encrypted?
0
Comment
Question by:tomhoran
[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
  • 10
  • 8
19 Comments
 
LVL 7

Expert Comment

by:markhoy
ID: 8197353
Is the binary write (the source of the PDF) coming from the SSL folder? ie a SECURE folder?
0
 

Author Comment

by:tomhoran
ID: 8197389
i would have to say yes. the ssl is www.repayme.com and then the folder for the binarywrite comes from

www.repayme.com/admin/reports/binarywritepgm.asp (not the real name)
0
 
LVL 7

Expert Comment

by:markhoy
ID: 8198311
so they are both https:// ? including the source that you read to make the pdf? There was a post similar to this recently- I did a search on the archives but couldn't find it..

Have you looked at any tech articles on thawte.com or openssl.org?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:tomhoran
ID: 8198404
no. I'm using crystal to create the .pdf file stream, here is my code:


Set oApp = Server.CreateObject("CrystalRuntime.Application.9")
Path = Request.ServerVariables("PATH_TRANSLATED")                    
While (Right(Path, 1) <> "\" And Len(Path) <> 0)                      
     iLen = Len(Path) - 1                                                  
     Path = Left(Path, iLen)                                              
Wend

Set oRpt = oApp.OpenReport(Path & ReportName, 1)
Set oPageEngine = oRpt.PageEngine
Pagehelper = Array()
Set oPageGenerator = oPageEngine.CreatePageGenerator(PageHelper)

recordsel = "{reimburse_check.delivery_method} = 'L' " & _
     "and {reimburse_check.cust_no} = '" & custno & "' " & _
     "and {reimburse_check.process_no} = " & whichproc & _
     whichcmp
oRpt.RecordSelectionFormula = CStr(recordsel)

oRpt.ParameterFields.GetItemByName("plain_paper").AddCurrentValue(CStr(plainpaper))
oRpt.ParameterFields.GetItemByName("test_check").AddCurrentValue(CStr(testcheck))

'///////////////////////////////////////////////////////////
'//  Use the report object and the export options object  //
'//  to set up the export type and destination.         //
'///////////////////////////////////////////////////////////

With oRpt
     .MorePrintEngineErrorMessages = False
     .EnableParameterPrompting = False
          With .ExportOptions
               .DestinationType = DestinationType
               .FormatType = FormatType
          End With
End With

With Response
     .Expires = 0
     .Buffer = True
     .Clear
     .ContentType = "application/pdf"
     .BinaryWrite oPageGenerator.Export(8209)
End With
0
 

Author Comment

by:tomhoran
ID: 8198410
no. I'm using crystal to create the .pdf file stream, here is my code:


Set oApp = Server.CreateObject("CrystalRuntime.Application.9")
Path = Request.ServerVariables("PATH_TRANSLATED")                    
While (Right(Path, 1) <> "\" And Len(Path) <> 0)                      
     iLen = Len(Path) - 1                                                  
     Path = Left(Path, iLen)                                              
Wend

Set oRpt = oApp.OpenReport(Path & ReportName, 1)
Set oPageEngine = oRpt.PageEngine
Pagehelper = Array()
Set oPageGenerator = oPageEngine.CreatePageGenerator(PageHelper)

recordsel = "{reimburse_check.delivery_method} = 'L' " & _
     "and {reimburse_check.cust_no} = '" & custno & "' " & _
     "and {reimburse_check.process_no} = " & whichproc & _
     whichcmp
oRpt.RecordSelectionFormula = CStr(recordsel)

oRpt.ParameterFields.GetItemByName("plain_paper").AddCurrentValue(CStr(plainpaper))
oRpt.ParameterFields.GetItemByName("test_check").AddCurrentValue(CStr(testcheck))

'///////////////////////////////////////////////////////////
'//  Use the report object and the export options object  //
'//  to set up the export type and destination.         //
'///////////////////////////////////////////////////////////

With oRpt
     .MorePrintEngineErrorMessages = False
     .EnableParameterPrompting = False
          With .ExportOptions
               .DestinationType = DestinationType
               .FormatType = FormatType
          End With
End With

With Response
     .Expires = 0
     .Buffer = True
     .Clear
     .ContentType = "application/pdf"
     .BinaryWrite oPageGenerator.Export(8209)
End With
0
 
LVL 7

Expert Comment

by:markhoy
ID: 8198468
I think it's because the crystal dll is in the system folder and not the ssl folder so when it is called you get the message. I wish I could find the post from the other week... Are you able to copy and register the Crystal dll in the SSL folder?
0
 

Author Comment

by:tomhoran
ID: 8198525
not sure that's the problem as their activex view doesn't have this problem.

i talked with them and they mentioned that it had to do with the header or something not being created before the binary string was hitting the browser.
0
 
LVL 7

Expert Comment

by:markhoy
ID: 8198537
can you use a server.execute to make the file on the fly and then read it?
0
 

Author Comment

by:tomhoran
ID: 8198728
what would that do for me? what does "server.execute" do?
0
 
LVL 7

Expert Comment

by:markhoy
ID: 8198795
don't quote me (see the msdn site on "25 ways to improve web site performance"..
http://msdn.microsoft.com/workshop/server/asp/asptips.asp) but I think it's an IIS5 way of executing a server file ie an asp file within the body of an asp page- so you might be able to make the pdf that way
0
 
LVL 3

Expert Comment

by:jSkipB
ID: 8200117
The PDF file doesn't contain any http: references, like images et al, does it?
0
 

Author Comment

by:tomhoran
ID: 8200380
no images at all. if i save it to a file then display it via a href it displays with no problems.
0
 
LVL 7

Accepted Solution

by:
markhoy earned 525 total points
ID: 8203252
Tom,

see here for server.execute:

http://www.4guysfromrolla.com/webtech/042602-1.shtml
0
 

Author Comment

by:tomhoran
ID: 8204453
I got this thing figured out...I know where the problem is, just don't know why.

Here are the steps:

1: I have a window with a hyper-link. When it's clicked it opens a new window (wk1.asp), which is secure as the lock is in the status bar.

2: This new window (wk1.asp) allows the user to select what they want to include in the .pdf file/report. They fill in some fields then click a button which then does a response.redirect to wk2.asp (I've also confirmed that it's an issue when using a form/submit)

3: wk2.asp has the code to create the response.BinaryWrite and this is where/when I get the "This page both secure and non-secure items. Do you want to display the non-secure items?"

The interesting thing is, if I do a hyper link to wk2.asp instead of a response.redirect or submit I don’t get the error???
0
 
LVL 7

Expert Comment

by:markhoy
ID: 8204493
when you submit the form or use a redirect, are you using the full https://www.dom.com/w2k.asp ?
0
 

Author Comment

by:tomhoran
ID: 8204529
no. I don't do that with any of the other 200+ pages in the system. the page is is already within the secure site, so it shouldn't be needed
0
 

Author Comment

by:tomhoran
ID: 8204545
just for the heck of it i added the https:// on the submit and same error occured
0
 
LVL 7

Expert Comment

by:markhoy
ID: 8204583
I know this'll sound odd, have you tried recreating the page from scratch on overwriting the old file? Strange one!
0
 

Author Comment

by:tomhoran
ID: 8258179
Thanks for your help
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

752 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