Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamically Generating a File for Download

Reply
Thread Tools

Dynamically Generating a File for Download

 
 
Guest
Posts: n/a
 
      10-23-2006
I have some sensitive data encrypted in a database. I need to allow the authorized people to produce a report (obviously, unencrypted) that they can send to the appropriate partners. Can I set it up so they can download a .csv of the data without actually producing the csv and saving it on the server side?

I suppose the best description would be that on the client side, there's a link on a web page that looks like it links to the csv, but the csv is dynamically generating and served when they click on it. Client can save it on their side, but no actual csv is saved on the server side. Somehow the data is streamed to the client directly from the database throug the decryption algorithm.

Any thoughts? Thanks.

Jerry
 
Reply With Quote
 
 
 
 
Jester98x
Guest
Posts: n/a
 
      10-23-2006

am wrote:
> I have some sensitive data encrypted in a database. I need to allow the authorized people to produce a report (obviously, unencrypted) that they can send to the appropriate partners. Can I set it up so they can download a .csv of the data without actually producing the csv and saving it on the server side?
>
> I suppose the best description would be that on the client side, there's a link on a web page that looks like it links to the csv, but the csv is dynamically generating and served when they click on it. Client can save it on their side, but no actual csv is saved on the server side. Somehow the data is streamed to the client directly from the database throug the decryption algorithm.
>
> Any thoughts? Thanks.
>
> Jerry



Jerry,

More of a pointer than a step by step guide.

You can generate a text page, csv file, and return that to the user in
the same way you would a html page, however in the code that returns
the response to the user, change the mimetype of the page to the type
relevant to a csv file, you can also provide information as to the name
of the file if you wish. This is something I have done in the past for
returning data to the user as CSV or Excel files just by manipulating
the mimetype. Unfortunatly I don't have the code to hand, or the exact
details to answer your query. I think the Response object lets you
manipulate the mimetype of the response sent back to the browser.

Steve

 
Reply With Quote
 
 
 
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      10-24-2006
Hi,

I think you can refer to following KB as an example:

#HOW TO: Read and Write BLOB Data by Using ADO.NET Through ASP.NET
http://support.microsoft.com/kb/326502

Although it's reading data from database using ADO.NET, I think the idea is
alike: you could just decrypt the data in memory and write the result byte
array to the Response.

Please let me know if you need further information on this post. Thank you.

Sincerely,
Walter Wang (, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Direct Download Movies - No Download Limits - Download DivX DVDMovies hussain dandan Python 0 12-06-2009 04:52 AM
Forcing Download of File Appends HTML from Download Page to Downloaded File? Brett Kelly ASP .Net 1 06-16-2006 04:05 AM
problem with code download file - two window file download Sam -- ASP .Net 2 03-17-2005 04:20 PM
Generating XML File dynamically using ASP and SQL Database Jon XML 1 02-11-2005 12:41 AM
File upload/download from database. Download appends aspx page to end of file Ryan Taylor ASP .Net 2 11-10-2004 08:31 PM



Advertisments