Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

dears

i have a problem here i have a windows app which synchronize with a web site

and get news from the site and save it on the client's pc as xml and also save the user setting as xml the problem here that the xml is readable i don't want the client to be able to read those file so i decided to serialize the file as binary files

here's my serialization function

 

 

 

public bool Serialize(string fileName,object Object)

{

try

{

FileStream fs = new FileStream(fileName, FileMode.Create);

BinaryFormatter formatter = new BinaryFormatter();

formatter.Serialize(fs, Object);

return true;

 

}

catch

{

return false;

 

}

 

}

 

 

 

 

usualy i read the xml as string and serialize it and save it on the file with extension bin the problem here that the user still can read the file if he open it using notepad

so does anyone have any idea about how fix this problem or another way to hide the data

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...