[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MD5 Encryption in VB.Net Windows App

Posted on 2006-10-24
4
Medium Priority
?
333 Views
Last Modified: 2006-11-18
We want to use the same user authentication from a new Windows application as is used in a VB.Net 2003 Intranet app.  Both access the same SQL database.

The web authentication uses:

        Dim MyAuthentication As New System.Web.Security.FormsAuthentication
        Dim pwd As String = MyAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "md5")
 
Is there a corresponding way to do this in a classic windows app so the encrypted password will be the same?

Thanks
0
Comment
Question by:John4343
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:jonorossi
ID: 17795966
If you add a reference to System.Web into your Windows Forms application and use code like this:

System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile("password", "md5")
0
 

Author Comment

by:John4343
ID: 17796116
I had tried that earlier but get "security is not a member of web" error.
0
 
LVL 9

Accepted Solution

by:
jonorossi earned 1000 total points
ID: 17796196
Was this at compile time? If you didn't add a reference to System.Web in your project then you would only have access to a few System.Web classes (AspNetHostingPermission ones).
0
 

Author Comment

by:John4343
ID: 17796248
Thanks.  I did the imports but not the reference.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month18 days, 1 hour left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question