加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 错误:在Visual Studio 2013中找不到类型或命名空间名称“

发布时间:2020-12-15 07:53:37 所属栏目:百科 来源:网络整理
导读:我正在关注“RESTful WCF服务”教程.但是,当我构建我的应用程序时,我收到此错误: The type or namespace name ‘ApplicationUser’ could not be found (are you missing a using directive or an assembly reference?) c:usersbasmadocumentsvisual st
我正在关注“RESTful WCF服务”教程.但是,当我构建我的应用程序时,我收到此错误:

The type or namespace name ‘ApplicationUser’ could not be found (are you missing a using directive or an assembly reference?)
c:usersbasmadocumentsvisual studio 2013ProjectsOnlineStore2OnlineStore2_ClientApp_StartIdentityConfig.cs

我搜索了很多答案,其中谈到“Microsoft ASP.NET Identity.owin”,但我添加了这个引用,但仍然得到这个错误

解决方法

创建一个名为ApplicationUser的类,该类派生自IdentityUser.它不需要任何属性或方法,但您可以随意扩展它,以及您希望存储的有关系统上每个用户的任何信息(想想名称,地址等).
public class ApplicationUser : IdentityUser
{
    public virtual string Email { get; set; } // example,not necessary
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读