We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

MD5 Encryption in VB.Net Windows App

John4343
John4343 asked
on
Medium Priority
343 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
Comment
Watch Question

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")

Author

Commented:
I had tried that earlier but get "security is not a member of web" error.
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).

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Thanks.  I did the imports but not the reference.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.