Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8374853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:01:16+00:00 2026-06-09T15:01:16+00:00

I have a winforms application that connects to a couple of databases. However, I

  • 0

I have a winforms application that connects to a couple of databases. However, I would like my app to be used even when the user is not connected to the internet. I had been writing datasets to XML files locally and reading them in based on the user preference whether to download from the database or use a local data file.

DataSet.WriteXml(localPath)

As the application is improving, I would like to encrypt the XML file to prevent the user from looking inside (There is a bunch of data in there but the application selectively displays data based on access levels assigned to users). I looked into ‘Rijndael Managed’ and got a prototype working based on Encrypt/Decrypt Files in VB.NET. I have not been able to figure how to pass in a stream to cryptography classes without them ever being saved to the disk.

Right now, I save the xml file out of the Dataset to a temporary directory and construct a new stream and pass it in to CrypotoStream which then writes an encrypted file to the desired location.

I am looking for a solution to directly pass in the stream without ever writing it to the disk. Please suggest.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:01:18+00:00Added an answer on June 9, 2026 at 3:01 pm

    a better thing to use would be the EncryptedXml Class

    EncryptedXml Class
    Encryption can entail different approaches for cryptographic strength, key bases, etc. Follow the examples in the MSDN documentation. This is not a short implementation, but it works extremely well.

    other alternatives

    Write into a MemoryStream and use MemoryStream.ToArray();

    to read the encrypted stream

    Just use the CryptoStream to load the DataSet.

    refer to this like to read/decrypt
    Read/decrypt encrypted XML file and then process internally

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a winforms application that I'd like to add a WPF user control
I have a WinForms application that is being used on tablet PC's with touch
I have a standard WinForms application that connects to a SQL Server. The application
We have a .NET 2.0 winforms app that connects to a SQL Server 2005
I have a Winforms application that the user uses to take a region based
I have a WinForms business application that connects to a SQL Server on a
I have a Winforms application that generates its own PrintDocument object for printing. It
We have a WinForms application that uses SQL server to store its data. To
I have a Winforms application that schedules some work using a service. The service
I have a Winforms application that dynamically instantiates external form objects for use in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.