Wondering if anyone else has experienced this and what their solution was if so. In Visual Studio 2013 I create a new ASP.NET Web Application, leaving all the defaults as they are

In the next screen I pick MVC, adding folders and core references for MVC but not the other two options. Authentication is left at Individual User Accounts and I've unchecked the Host in the cloud option, as shown below.

Initial post new project screen

The project wizard completes and I can see that there are 26 errors in it before I do anything else.

The first fix that removes a bunch of these errors is that the Views\Account\ _SetPasswordPartial.cshtml and _ChangePasswordPartial.cshtml files contain invalid models so I change those as follows:

[My project name here is WebApplication1, substitute your own value]

In _SetPasswordPartial.cshtml: From @model WebApplication1.Models.ManageUserViewModel to @model WebApplication1.Models.SetPasswordViewModel

In file _ChangePasswordPartial.cshtml: From @model Microsoft.AspNet.Identity.ManageUserViewModel to @model WebApplication1.Models.ChangePasswordViewModel

That drops me down to 4 errors, spread across 4 files

1. Line 68, ManageController.cs

return View(linkedAccounts);

The view RemoveLogin doesn't exist

2,3. There are two errors _SetPasswordPartial.cshtml and _ChangePasswordPartial.cshtml complaining about not being able to resolve the Manage action but when I debug and visit those URLs in the browser they work fine so I suspect they're in a route table somewhere. I have R# installed so sometimes that can be wrong if that's the case.

4. The last one is that the _RemoveAccountPartial.cshtml has an error on line 15 where it complains about not having a Disassociate action in the Account controller, as far as I can ascertain this is to do with removing other authentication providers to the application.

Now I can fix all these by adding the required code but it just doesn't sit well with me that the templates don't work well out of the box. Are there fresh templates available or has anyone done the canonical write-up on how to get your template humming before you commence work properly on it?

Related posts

Recent Viewed