既然知道错误在哪里为何不去再次看看或检察一下呢?
“但用C#写就老是报错:CS0246: 找不到类型或命名空间名称“FormsAuthortication”这是你错误的根源,你去看看是不是关键字写错了,或有没有调用这个命名空间就得了!

解决方案 »

  1.   

    朋友,你的拼写水平实在是....看看这几行,一个是对的,一个是错的.
        if (mdpass=="SHA1"){  
              lastpass=FormsAuthentication.HashPasswordForStoringInConfigFile(str ,"SHA1");  
             }  
          else if (mdpass=="MD5")  
              {  lastpass=FormsAuthortication.HashPasswordForStoringInConfigFile(str ,"MD5");FormsAuthortication should be FormsAuthentication 
    ----------------------------------------
    To teach a fish how to swim.