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 8990017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:24:14+00:00 2026-06-15T22:24:14+00:00

After upgrading to .Net 4.5, I am now getting the warning that System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile is

  • 0

After upgrading to .Net 4.5, I am now getting the warning that “System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile is obsolete” and the suggestion is to use the membership APIs instead.

This is all very well and good for new projects, but at this stage (with user data and hashed passwords existing), I can’t very well change to a custom membership provider with potentially different ways of hashing.

Whats the recommended way forward for issues like this? Continuing to use “obsolete” calls is obviously not the suggested path, so has it been replaced by something else other than “just use the membership APIs”?

  • 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-15T22:24:16+00:00Added an answer on June 15, 2026 at 10:24 pm

    This is a solution for SHA1 variant.

         public static string GetSwcSHA1(string value)
         {
            SHA1 algorithm = SHA1.Create();
            byte[] data = algorithm.ComputeHash(Encoding.UTF8.GetBytes(value));
            string sh1 = "";
            for (int i = 0; i < data.Length; i++)
            {
                sh1 += data[i].ToString("x2").ToUpperInvariant();
            }
            return sh1;
         }
    

    For MD5 you only need to change the algorithm to:

    MD5 algorithm = MD5.Create();
    

    Hope you don’t mind, just going to add a VB.NET variant of your code above:

        Public Shared Function CreateHash(saltAndPassword) As String
            Dim Algorithm As SHA1 = SHA1.Create()
            Dim Data As Byte() = Algorithm.ComputeHash(Encoding.UTF8.GetBytes(saltAndPassword))
            Dim Hashed As String = ""
    
            For i As Integer = 0 To Data.Length - 1
                Hashed &= Data(i).ToString("x2").ToUpperInvariant()
            Next
    
            Return Hashed
        End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After upgrading my web app from .Net 3.5 to .Net4.0, I get a security
After upgrading to Android 2.3.4, I am getting following exception: javax.net.ssl.SSLException: Read error: ssl=0x*:
After upgrading our web application to .NET 3.5 we noticed a strange issue with
After upgrading node to v0.8.1, bundled Meteor apps now throw an error: node: symbol
After upgrading to 12.04, my Eclipse that I had since 11.10 has been full
After upgrading from Spring 3.0.0.M4 to 3.0.0.RC1 and Spring Security 3.0.0.M2 to 3.0.0.RC1, I've
I noticed after upgrading from 4.2 to 4.3.1 that there is no longer a
We are getting this error after upgrading to NHibernate 2.1. [QueryException: Cannot simultaneously fetch
After upgrading a project from Flex4 Beta1 to Beta2, I've found that the background-image
After upgrading to NHibernate 3.1 and .Net 4 I am seeing a strange exception

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.