Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 23rd, 2014, 05:44 AM
Registered User
Points: 42, Level: 1
Points: 42, Level: 1 Points: 42, Level: 1 Points: 42, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default How to Open Encrypted PDF file in ASPX

Hi,

I'm looking for a sample code or library file/components to open the encrypted PDF file in web application (ASPX). The web application is written using Visual Studio 2003 (.netframework v1.14).

Appreciate anybody advice and recommendation.

Thanks.

Best Regards,
HL
  #2 (permalink)  
Old April 24th, 2014, 01:20 AM
Friend of Wrox
Points: 528, Level: 8
Points: 528, Level: 8 Points: 528, Level: 8 Points: 528, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

You would need to know how (encryption algo used) the file data was encrypted and the key and IV used to encrypted the data. If you know these things, apply the decryption methods to the file data prior to writing it to the response stream.

Last edited by mmorgan30; April 24th, 2014 at 01:28 AM.
  #3 (permalink)  
Old April 24th, 2014, 02:38 AM
Registered User
Points: 42, Level: 1
Points: 42, Level: 1 Points: 42, Level: 1 Points: 42, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

Hi,

The PDF file is protected/Encrypted with password. I want to open this PDF file with the application directly because the application know the password to open the PDF file instead of asking the user to enter the password.
The Following User Says Thank You to ht055 For This Useful Post:
mmorgan30 (April 26th, 2014)
  #4 (permalink)  
Old April 26th, 2014, 09:29 PM
Friend of Wrox
Points: 528, Level: 8
Points: 528, Level: 8 Points: 528, Level: 8 Points: 528, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

Do you know how the file is encrypted?
Are you wanting your ASP.net application to decrypt it and IIS serve it?

Last edited by mmorgan30; April 26th, 2014 at 09:38 PM.
  #5 (permalink)  
Old April 27th, 2014, 04:32 AM
Registered User
Points: 42, Level: 1
Points: 42, Level: 1 Points: 42, Level: 1 Points: 42, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

I want the asp.net application to open the PDF file by pass-in the password because the PDF file is protected with password.

Any help...
  #6 (permalink)  
Old April 27th, 2014, 10:21 PM
Friend of Wrox
Points: 528, Level: 8
Points: 528, Level: 8 Points: 528, Level: 8 Points: 528, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

what do you mean "by passing in the password" like in a control like a password text box?

There are lots of pdf libraries out that can be leveraged, if you dont have a pdf library right now to handel your encrypting and decrypting needs, Check docotic pdf it should give you what you need.

Since your application needs to decrypt the file prior to serving it, you will need to add a linkbutton so that you can implement the onclick event to handle decryption and writing to the repsonse stream.


Since you have not given any details about the encrypted file i'll show you how to implement response writing in the click event.

Code:
protected void LinkButton1_Click(object sender, EventArgs e)
{

      // code for you pdf work here


      // now write pdf data to the response stream
      Response.Clear();
      Response.Headers["Content-Type"] = "application/pdf";
      Response.Headers["Content-Length"] = pdfData.Length;
      Response.BinaryWrite(pdfData);
      Response.End();
}

Last edited by mmorgan30; April 27th, 2014 at 11:34 PM.
  #7 (permalink)  
Old April 28th, 2014, 03:27 AM
Registered User
Points: 42, Level: 1
Points: 42, Level: 1 Points: 42, Level: 1 Points: 42, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

Hi,

The Docotic.Pdf Library is for .NET 2.0 and later frameworks.

I'm looking for library for .NET 1.1.

I refresh my question:

I have a PDF file. The PDF file is embedded with user and owner password.

I want to open this PDF file in asp.net application written in .netframework version 1.1.

I'm looking for sample programming code or any library file that can support .netframework version 1.1 to open this PDF file in asp.net application.

The library file that i'm looking should have a property "Password". So the application can set the "password" and ask the library file to open the PDF file without asking the user to enter the password.
  #8 (permalink)  
Old April 28th, 2014, 05:49 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Location: new york
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to JudyHaar
Default Premium Garcinia Extract - Lose fat easily and effectively

I was in a constant search of that one prominent weight loss product that could help me become slim, trim and healthy. And, I got lucky to get Premium Garcinia Extract.
click for more info:- https://storify.com/nicolrpsneiman/p...ght-loss-formu
  #9 (permalink)  
Old April 28th, 2014, 07:11 AM
Registered User
Points: 42, Level: 1
Points: 42, Level: 1 Points: 42, Level: 1 Points: 42, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

JodyHaar,

Your posting is not related to the question!!!!!
  #10 (permalink)  
Old April 28th, 2014, 11:28 AM
Registered User
Points: 42, Level: 1
Points: 42, Level: 1 Points: 42, Level: 1 Points: 42, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Default

yes.... any recommendation on the .net library to support .netframework 1.1?
 


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I upload a PDF file on AddEditReview.aspx page? southside123 BOOK: Beginning ASP.NET 4.5 : in C# and VB 13 April 27th, 2014 09:42 AM
open pdf file within aspx page shaktis General .NET 3 November 2nd, 2007 01:58 PM
open a pdf file viren_balaut J2EE 0 January 26th, 2004 10:50 PM
open a pdf file viren_balaut Servlets 0 January 24th, 2004 01:03 AM
open a pdf file in browser viren_balaut Pro JSP 0 January 12th, 2004 01:27 PM



All times are GMT -4. The time now is 11:34 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.