在客户机用一个指定文件保存对应的用户名和密码
每次启动程序的时候先检查这个文件

解决方案 »

  1.   

    或者把用户的登录信息保存在注册表里也行每次启动登录窗口的时候先读注册表项
      

  2.   

    如果指定一个文件保存密码,那密码起不是很容易被盗?难道要加密?
    腾讯的记住密码是什么原理?
      

  3.   

    用md5加一下不就行了吗?public static string HashCryptString(string strText,string method){
                if(method == "MD5"){
                    strText = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(strText,"MD5");
    //                MD5 md5 = new MD5CryptoServiceProvider();
    //              strText = System.Text.Encoding.UTF8.GetString(md5.ComputeHash(System.Text.Encoding.UTF8.GetBytes(strText)));
                }
                else if(method == "SHA1"){
                    strText = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(strText,"SHA1");
    //                SHA1 sha1 = new SHA1CryptoServiceProvider();
    //                strText = System.Text.Encoding.UTF8.GetString(sha1.ComputeHash(System.Text.Encoding.UTF8.GetBytes(strText)));
                }
                return strText;
            }
      

  4.   

    腾讯也是保存在本地文件的啊。
    你可以把文件名和路径搞隐蔽点,至于里面的用户名和密码,肯定是要加密的啊
      

  5.   

    不用保存密码在本地呀.保存一个用户名在本地.然后下次进的时候用这个用户名直接从数据库中取出密码登录不得了?