473,786 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Serialization of Application Settings password

I am using the application settings example @
http://msdn.microsoft.com/msdnmag/is...s/default.aspx .
My application needs to save a user name and password in encrypted format
into the XML settings file. I modified the settings.vb class to include code
that encrypts and decrypts the user name and password as needed. The problem
I am having is getting the username and password to store as encrypted in
the XML document. I have a public property that looks like this:

Public Property PWD() As String
Get
PWD = TextUnScramble( mPWD)
End Get
Set(ByVal Value As String)
mPWD = TextScramble(Va lue)
End Set
End Property

When I load the password back into my application the settings class
deserializes the information from the XML file so it consequently runs the
set method of my PWD property which then my app must call the Get of PWD to
get the actual value back into my application. The same situation occurs in
reverse when it serializes the information to the XML. When is the proper
time to run the methods I have defined as TextUnScramble and TextScramble. I
also want to be able to retrieve the information in the PWD property from my
app in decrypted format. Any help would be greatly appreciated.

Thanks,
Curtis

Nov 21 '05 #1
1 1347
I believe I solved my problem by making 2 Public Functions:

Public Function SetPWD(ByVal PWD As String)
mPWD = TextScramble(PW D)
End Function
Public Function GetPWD() As String
Return TextUnScramble( mPWD)
End Function

Thanks,
Curtis

"Curtis" <cs*****@hotmai l.com> wrote in message
news:Og******** ******@TK2MSFTN GP12.phx.gbl...
I am using the application settings example @
http://msdn.microsoft.com/msdnmag/is...s/default.aspx
. My application needs to save a user name and password in encrypted format
into the XML settings file. I modified the settings.vb class to include
code that encrypts and decrypts the user name and password as needed. The
problem I am having is getting the username and password to store as
encrypted in the XML document. I have a public property that looks like
this:

Public Property PWD() As String
Get
PWD = TextUnScramble( mPWD)
End Get
Set(ByVal Value As String)
mPWD = TextScramble(Va lue)
End Set
End Property

When I load the password back into my application the settings class
deserializes the information from the XML file so it consequently runs the
set method of my PWD property which then my app must call the Get of PWD
to get the actual value back into my application. The same situation
occurs in reverse when it serializes the information to the XML. When is
the proper time to run the methods I have defined as TextUnScramble and
TextScramble. I also want to be able to retrieve the information in the
PWD property from my app in decrypted format. Any help would be greatly
appreciated.

Thanks,
Curtis

Nov 21 '05 #2

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

Similar topics

4
2334
by: ron | last post by:
Hi, I have class object that i serialize using the System.Xml.Serialization class. Intermittently the object is not getting serialized correctly, using System.Xml.Serialization classes. Therefore the application errors out when deserializing the xml data. It places the some part of the child element
2
1807
by: Mike | last post by:
Hello. I am using C# in .NET v1.1. I am trying to serialize an object to disk and read it back again. The serialization seems to work OK (at least, it completes without error). However, I get the following error when trying to deserialize: An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
0
1040
by: davesauny | last post by:
Hi guys, I'm having trouble with serialization especially of array elements! What I have is an array of clsUsers which have various properties as shown in the code below The XML I want to achieve is shown at the top and underneath that is the xml i have achieved.... any help you can provide would be most helpful!
2
588
by: Petr PALAS | last post by:
Hi, when I open ANY ASP.NET application on my computer I get this message: ---------------------------------------------------------------------------- ---- Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser
5
2790
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE ------------------------------------------------------------------------------- -
1
2981
by: Reza Sadeghi | last post by:
Hi I am getting this error when I tried to browse any asp.net in visual studio.net. I can build the project but when I try to run and debug the project I get error message that "Unable to start debugging on the web server. server side error occurred on sending debug HTTP Request. I am running WinXP Pro SP1 with all hotfixes and VS.NET 2002 and .NET Framework 1.0
6
1589
by: Larry Serflaten | last post by:
Acording to Bob Powell, serializing an object should be a breeze: http://groups.google.com/groups?hl=en&lr=&safe=off&selm=%23TR3qvCcCHA.2544%40tkmsftngp11 But its not happening, and I can't see why not. When I save the file, it does not have near enough data to contain the object, so, no way will I be able to deserialize it. Can anyone see where I went wrong? No errors are reported, but I see no image being saved, or loaded in. ...
10
1490
by: SStory | last post by:
My app is near completed for the basic feature of version 1.0. I have an extensive object model and I now want to persist my objects using serialization. I have chosen binaryformatter to serialize, and custom serialization, which I understand will allow me the flexibility of not breaking old things when I add members to classes in the future and send to existing customers. 1.) is there anything else to consider with the custom...
4
2674
by: Sjaakie | last post by:
Hi, I've read some articles on serialization, but I don't see how to serialize the xml-structure below (if it is possible at all). Could you point me in the right direction? TIA <?xml version="1.0" encoding="utf-8" ?> <Settings> <ApplicationTitle>...</ApplicationTitle>
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10357
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
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
10104
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,...
1
7510
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
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
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
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.