一、 首先配置webconfig,再system.web节点中添加 <authentication mode="Forms"> <forms loginUrl="/Home/Login" timeout="120" cookieless="UseCookies" name="Lo