Csharp/C#教程:将asp.net MVC从5.0.0-beta2更新为5.0.0-rc1分享


将asp.net MVC从5.0.0-beta2更新为5.0.0-rc1

昨晚,我决定尝试将SignalR应用到我的应用程序,因为我使用MVC 5,我不得不使用SignalR的2.0 beta。

哦,男孩,什么时间。 昨晚,微软还决定推出所有mvc 5相关软件包的rc1,并且更新破坏了一些事情 – 主要是在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; } 

IdentityStoreManagerIdentityAuthenticationManager不再被识别。

有没有人成功迁移到rc1了? 我找不到MS的任何文档或更新的模板。

更新以下nuget包:

得到这些:

然后,您的AccountController.cs文件中仍会有很多错误。 但是现在你有你的项目中的类来修复它们,或者你可以获得我修复的AccountController.cs文件,它编译并运行应用程序,但是有一个地方(用todo评论:)我不确定关于。

您可以在我的github上的示例项目中下载我的AccountController.cs文件: https : //github.com/onybo/Asp.Net-Identity-RC1-sample-app

IdentityStoreManager现在称为IdentityStore

IdentityAuthenticationManager现在是IdentityManager

这些类已移动类型。 请查看以下提交以获取有关如何使AccountController工作的更多信息

https://github.com/rustd/AspnetIdentitySample/commit/b09479a9e5c2d4ff16c459ce0e4105c5ac5302f4

上述就是C#学习教程:将asp.net MVC从5.0.0-beta2更新为5.0.0-rc1分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/cdevelopment/1025625.html

(0)
上一篇 2022年1月8日
下一篇 2022年1月8日

精彩推荐