Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
191 views
in Technique[技术] by (71.8m points)

c# - Updating asp.net MVC from 5.0.0-beta2 to 5.0.0-rc1

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.

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 and IdentityAuthenticationManager are no longer recognized.

Has anyone successfully migrated to rc1 yet? I can't find any documentation or updated templates from MS.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Update the following nuget packages:

  • Microsoft ASP.NET Identity EntityFramework version="1.0.0-rc1"
  • Microsoft.Owin.Security version="2.0.0-rc1"
  • Microsoft.Owin.Security.OAuth version="2.0.0-rc1"

Get these:

  • Microsoft.AspNet.Identity.Owin version="1.0.0-rc1"
  • Microsoft.Owin.Host.SystemWeb version="2.0.0-rc1"

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.

You can download my AccountController.cs file from my sample project on github here: https://github.com/onybo/Asp.Net-Identity-RC1-sample-app


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...