473,699 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

store user DATA

hi
I am new to C# programming. can anyone tell me what is the standard way to
store high sensitive user data for application, so that application next run
can get back those data.

Nov 15 '05 #1
3 2497
Well that all depends on the tools available to you.

You could store the data in a database (SQL server, Access etc...) you
could store the data in a proprietary binary format. Databases are good for
persistent data storage and usually have pretty good security and
encryption.

-Casey
--
Legal Disclaimer: just in case you were wondering:
This posting is provided "AS IS" with no warranties, and confers no rights.

"pei_world" <pe*******@hotm ail.com> wrote in message
news:OW******** ******@TK2MSFTN GP12.phx.gbl...
hi
I am new to C# programming. can anyone tell me what is the standard way to store high sensitive user data for application, so that application next run can get back those data.

Nov 15 '05 #2
You have a bunch of different ways.

1. StreamReader and StreamWriter classes, allow you to read files.

// create or open a file
StreamWriter writer = new StreamWriter("c :\\test.txt");
// write data to it
writer.WriteLin e("File created using StreamWriter class.");
// close
writer.Close();

similar class called StreamReader reads the file.

Also you could create a class which derives from a persistent class,
which then allows you to write that classes properties to disk.

[Serializable]
public class Dog {
public string name;
public string licenseTag;
}

Dog d = new Doc ();
d.name = "Rex";
d.tag = "OU812";

IFormatter formatter = new BinaryFormatter ();
Stream stm = new FileStream("myD ataStore.dta",
FileMode.Create , FileAccess.Writ e,
FileShare.None) ;
formatter.Seria lize (stm,d); // stream the dog object out to disk.
stm.Close();

To read it back:
;IFormatter fmt = new BinaryFormatter ();
Stream stm = new FileStream("myD ataStore.dta",
FileMode.Open, FileAccess.Read ,
FileShare.Read) ;
Dog dogFromDisk = (Dog) fmt.Deserialize (stm);
stm.Close();

// the data has now been restored in the object
//
this will store the data in binary. If you need moer security then you could
(just a wacky thought)
after you write the object to disk, then encrypt it. When you load the
object back into memory, then
decrypt the file before loading the stream.

With the file writina approach you could also encrypt it before you write it
to file
and then when you read the data back in, then once you have read it, then
decrypt it maybe?

of course, there are things like xml disconnected datasets and databases and
all that, but my
impression was you wanted to store some simple data say password or
something like that in a file, which
is in the same directory as the application or something like that. With
that assumption, i think
these approaches should get you up and running pretty quickly without the
need for you
to learn any of those other technologies... . but as I said it depends on
your needs.

hope that helps,
J

hope thi

"pei_world" <pe*******@hotm ail.com> wrote in message
news:OW******** ******@TK2MSFTN GP12.phx.gbl...
hi
I am new to C# programming. can anyone tell me what is the standard way to store high sensitive user data for application, so that application next run can get back those data.

Nov 15 '05 #3
You have a bunch of different ways.

1. StreamReader and StreamWriter classes, allow you to read files.

// create or open a file
StreamWriter writer = new StreamWriter("c :\\test.txt");
// write data to it
writer.WriteLin e("File created using StreamWriter class.");
// close
writer.Close();

similar class called StreamReader reads the file.

Also you could create a class which derives from a persistent class,
which then allows you to write that classes properties to disk.

[Serializable]
public class Dog {
public string name;
public string licenseTag;
}

Dog d = new Doc ();
d.name = "Rex";
d.tag = "OU812";

IFormatter formatter = new BinaryFormatter ();
Stream stm = new FileStream("myD ataStore.dta",
FileMode.Create , FileAccess.Writ e,
FileShare.None) ;
formatter.Seria lize (stm,d); // stream the dog object out to disk.
stm.Close();

To read it back:
;IFormatter fmt = new BinaryFormatter ();
Stream stm = new FileStream("myD ataStore.dta",
FileMode.Open, FileAccess.Read ,
FileShare.Read) ;
Dog dogFromDisk = (Dog) fmt.Deserialize (stm);
stm.Close();

// the data has now been restored in the object
//
this will store the data in binary. If you need moer security then you could
(just a wacky thought)
after you write the object to disk, then encrypt it. When you load the
object back into memory, then
decrypt the file before loading the stream.

With the file writina approach you could also encrypt it before you write it
to file
and then when you read the data back in, then once you have read it, then
decrypt it maybe?

of course, there are things like xml disconnected datasets and databases and
all that, but my
impression was you wanted to store some simple data say password or
something like that in a file, which
is in the same directory as the application or something like that. With
that assumption, i think
these approaches should get you up and running pretty quickly without the
need for you
to learn any of those other technologies... . but as I said it depends on
your needs.

hope that helps,
J

hope thi

"pei_world" <pe*******@hotm ail.com> wrote in message
news:OW******** ******@TK2MSFTN GP12.phx.gbl...
hi
I am new to C# programming. can anyone tell me what is the standard way to store high sensitive user data for application, so that application next run can get back those data.

Nov 15 '05 #4

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

Similar topics

5
3394
by: Lars Behrens | last post by:
Hi there! For a web project I need a little expert help. I don't have written much code yet, just been fiddling around a bit, testing and planning. The web site will have a submission page for attendants of a congress. In a form the user will submit name, mailadress etc. and I plan to store the data in a list of dictionaries: People =
11
2534
by: Colin Steadman | last post by:
Hope this makes sense! I'm building an ASP page which allows uses to add items to an invoice via a form, ie: Item No Part No Order No Quanity Units Price VAT ------- ------- -------- ------- ----- ----- --- .... ... ... ... ... ... ... <Add item> <Submit>
2
12574
by: Peter Rilling | last post by:
How does Windows store passwords that it uses? For instance, when you install a service, you can provide it the username and password. This information is stored somehow so that at a later date the service can start without interaction from the user. Also for COM+ components. This is what I want to be able to do. I want the ability to store passwords in a protected manor so that my .NET application can start a secure process at a...
1
2834
by: pei_world | last post by:
hi I am new to C# programming. can anyone tell me what is the standard way to store high sensitive user data for application, so that application next run can get back those data.
5
4508
by: Guadala Harry | last post by:
What are my options for *securely* storing/retrieving the ID and password used by an ASP.NET application for accessing a SQL Server (using SQL Server authentication)? Please note that this ID and password would be different than the one the user enters for ASP.NET forms authentication. The ID/password in question is used by the application, itself, for accessing the SQL Server. Thanks in advance.
5
10627
by: moondaddy | last post by:
I'm caching a dataset in an asp.net session variable to hold a user's data. one data item I need to store is an image the user uploaded. My problem is that I don't know how to get the image into the dataset because I don't know what datatype to set the dataset column and then set this image to. I saw an example where someone defended a datatable in the global class and defined the column as an object, however, when I define a strongly...
0
2216
by: Harley | last post by:
I am trying to write a personal app to keep a bank balance and history. The problem I'm haveing is finding a decent way to store the data on a pocketpc under .net compact framewok useing vb.net. I need to store type, date, description, and total for each check/debit transaction as well as a balance and user settings. My problem is that I am learning vb.net now and I'm not ready to move into datbases yet so xml seems my only viable option,...
3
3145
by: noridotjabi | last post by:
Say I'm writting a program. In this program for some reason I need to store data somewere were I will be able to access it again. I don't want to store it in a file because then it could be deleted by another program or user. So, is there anyway to save data onto a computer so that it will not apear as a file (actually idealy not apear as anything at all), but will not get overwritten by any other program or file. If this is OS...
2
2176
by: Alex | last post by:
Hey Guys.. I'm just now starting to learn VB 2005, but I have a question that might help me in the long run. I hope to write applications which store user data, and without wanting the user to always have an MS SQL database (or other DB) on hand, is it possible to have VB 2005 store all data in XML files? It might be a substancial amount of data, like hundreds of records, but given these files are never edited manually, can XML handle...
0
230
by: Brian Vanderburg II | last post by:
Lance Gamet wrote: Lance Gamet wrote: One way I've just started to use it to create a utility function to return the location of the user data folder, depending on the operating system: import os, sys def GetUserDataDirectory(): dir = None
0
9032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8908
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7745
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.