问题描述
昨天晚上,我决定尝试和实施SignalR我的应用程序,因为我使用MVC 5,我不得不使用SignalR的2.0测试版。
Last night, I decided to try and implement SignalR to my application, and because I use MVC 5, I had to use the 2.0 beta of SignalR.
和男孩哦,什么时机。昨晚,微软也决定推出自己的MVC所有相关的5包RC1和更新打破一些东西 - 主要是在账户控制器,它在模板中为β2
And oh boy, what a timing. Last night, Microsoft also decided to roll out rc1 of all their mvc 5 related packages, and updating broke a few things - mostly in the account controller that is in the template for beta2.
public AccountController()
{
IdentityStore = new IdentityStoreManager();
AuthenticationManager = new IdentityAuthenticationManager(IdentityStore);
}
public AccountController(IdentityStoreManager storeManager, IdentityAuthenticationManager authManager)
{
IdentityStore = storeManager;
AuthenticationManager = authManager;
}
public IdentityStoreManager IdentityStore { get; private set; }
public IdentityAuthenticationManager AuthenticationManager { get; private set; }
IdentityStoreManager
和 IdentityAuthenticationManager
不再认可。
有没有人成功迁移到尚未RC1?我无法从MS找到任何文档或更新的模板。
Has anyone successfully migrated to rc1 yet? I can't find any documentation or updated templates from MS.
推荐答案
更新以下的NuGet包:
Update the following nuget packages:
- 微软ASP.NET身份的EntityFramework版本=1.0.0-RC1
- Microsoft.Owin.Security版本=2.0.0-RC1
- Microsoft.Owin.Security.OAuth版本=2.0.0-RC1
获取这些:
- Microsoft.AspNet.Identity.Owin版本=1.0.0-RC1
- Microsoft.Owin.Host.SystemWeb版本=2.0.0-RC1
那么你仍然会有很多错误在你AccountController.cs文件。
但是,现在你有类项目,以解决这些问题,或者你可以得到它固定我的AccountController.cs文件,以及它编译和运行应用程序,但有一个点(与待办事项评论:),我不知道约呢。
Then you will still have a lot of errors in your AccountController.cs file.But now you have the classes in your project to fix them, or you could get my AccountController.cs file which is fixed, well it compiles and the application runs, but there is a spot (commented with todo:) that I am not sure about yet.
您可以从我的样本项目在GitHub上下载我AccountController.cs文件:
https://github.com/onybo/Asp.Net-Identity-RC1-sample-app
You can download my AccountController.cs file from my sample project on github here:https://github.com/onybo/Asp.Net-Identity-RC1-sample-app
这篇关于从5.0.0-β2更新asp.net MVC到5.0.0-RC1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!