我做的winfrom应用程序,在密码验证的代码是  string EncryptPassword = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(PasswordString, "SH1");
结果报:“passwordFormat”参数的值无效。请问该怎么解决,谢谢各位了,

解决方案 »

  1.   

    System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(s,"MD5");
    MD5是可以的
      

  2.   

    如果是web应用程序,System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(PasswordString, "SH1");
    也是对的,但是我现在要做C/S应用程序,我用这个代码结果报:“passwordFormat”参数的值无效。请问该如何解决,谢谢各位!
      

  3.   

    你是使用SH1加密码?? 
    string EncryptPassword = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(PasswordString, "SHA1");
    这样就可以了.
      

  4.   

    web应用程序的话这样是可以的,但是要做C/S应用程序就不行了,
      

  5.   

    web应用程序的话这样是可以的,但是要做C/S应用程序就不行了,C/S可以用另外的方法