473,395 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Dynamically Generating a File for Download

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
Oct 23 '06 #1
2 1446

rl*****@newsgroups.nospam 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

Oct 23 '06 #2
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 (wa****@online.microsoft.com, 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.

Oct 24 '06 #3

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

Similar topics

13
by: Tim Henderson | last post by:
Hi I want to dynamically generate a graph in python that would be displayable on a web page. What would be the best way to do this? The reason I want to do this, is because I am making a program...
5
by: vanisathish | last post by:
Hi All, I need to constantly update some values to the User Interface. In order to do the updation efficiently, i am planning to run some script in the server side that constantly keeps sending...
5
by: Tim Mulholland | last post by:
I am trying to create an ASPX page that, based on QueryString inputs, returns another file, in this case a WMA file. I do not want to do this by redirect, because these files are not available...
6
by: Smugsboy | last post by:
Need some help. I would like to create in my site a picture that when a user clicks on it, a javascript code which determines which file is to be downloaded to the user, is ran. My problem is...
27
by: ted benedict | last post by:
hi everybody, i hope this is the right place to discuss this weird behaviour. i am getting dynamically generated text or xml from the server side using xmlhttprequest. if the server side data is...
2
by: Patrick | last post by:
Hello, I have an ASP page, where I want to add buttons dynamically. I used C# and a for-loop do to this. The button generating code looks like this: Button bt1 = new Button(); bt1.Text =...
4
by: max | last post by:
Hello, Based on various posts, I've come up with the following code to load data into a js array dynamically without a screen refresh. It works, but you have to push the button twice before it...
1
by: archana | last post by:
Hi all, Can anyone tell me how to generate xsd file dynamically for datatable. And then how to create datatable from that dynamically generated xsd file. I want to generate datatable from...
2
by: Nathan Sokalski | last post by:
There are many situations in which we want to assign certain styles with multiple CSS properties to a control, quite often the same ones for multiple controls. Sometimes these styles must be...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.