目前做了一個的網站,只需要一個用戶也就是管理員,我想直接將用戶名和密碼存儲在web.config的credentials節點中。System.Web.Security.FormsAuthentication 這個類可以驗證credentials節點中的用戶和密碼。但是我還想實現在程序中動態修改密碼的功能,該怎么實現呢
2 回答

慕哥9229398
TA貢獻1877條經驗 獲得超6個贊
剩下的就是查找配置節,讀取配置節的問題了。
// running on the local server. System.Configuration.Configuration config = WebConfigurationManager.OpenWebConfiguration("/system.web/authentication/...") as System.Configuration.Configuration;
- 2 回答
- 0 關注
- 1136 瀏覽
添加回答
舉報
0/150
提交
取消