System.Web.Security 在winform中是什么命名空间呢

 

des.Key = ASCIIEncoding.ASCII.GetBytes(System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfig

以上代码在winform中,老是报如下错误,
错误 2 命名空间“System.Web”中不存在类型或命名空间名称“Security”。是否缺少程序集引用? 

 

解决方法:

首先确保你使用的是完整版的.net框架,在项目-属性-目标框架中,下拉选择的不是.net 4.0 client profile而是.net framework 4.0。然后在项目-添加引用中添加对system.web的引用。

 

Net Framework 4.0 和.Net Framework 4.0 Client Profile

posted @ 2016-02-17 13:40  wuling129  阅读(2603)  评论(0编辑  收藏  举报