asp.net-mvc-5.1 Questions

3

I am using ASP.NET MVC5 and Identity 2.0 (beta). It is possible for users to change the username? I am trying using UserManager.UpdateAsync method throws an exception. Regrads, Fran.
Riedel asked 13/2, 2014 at 8:25

1

When the Seedmethod runs, records/objects are added to my database. Every object is added as it should till I try add users to my application(at the bottom of Seed method). No one is added. Also ...
Delvecchio asked 17/8, 2014 at 23:58

4

Solved

Using Visual Studio 2013, I migrated a hybrid Asp.Net Webforms/MVC 3 web application to Asp.Net Webforms/MVC 5.1. As part of the migration I upgraded Jquery from 1.9.1 to 2.1.1, using the NuGet pac...
Piety asked 2/7, 2014 at 14:26

3

Solved

We want to handle 403 errors, 404 errors, all errors due to a MySpecialDomainException and provide a default error page for all other errors (including errors in the IIS configuration!). All errors...

1

I have a directory "Downloads" where I have static files that our clients can download. I am using the the following ActionLink to call the file: @Html.ActionLink("Download Example", "Download", n...

1

Solved

I was searching but I could not find one answer to this question: does aspnet identity provide one way to avoid simultaneous login from the same account?

5

Solved

I'm update my MVC5 project to MVC5.1 and now have exception on route dictionary: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); stack trace: {"Method not found: 'System.Web.Routing.RouteValu...
Antiquarian asked 27/1, 2014 at 8:41

1

I want to add User authorization and authentication in asp.net mvc project. I am Entity Framework Code First. Now I want to create some default user and default role for it. For this I want to crea...
Ursuline asked 2/4, 2014 at 4:52

2

Solved

I can create users in the old way: var users = new List<ApplicationUser> { new ApplicationUser{PasswordHash = hasher.HashPassword("TestPass44!"), Email = "[email protected]", UserNam...
Millennium asked 20/8, 2014 at 16:37

3

After adding WebAPI and register it in Global.asax. We find our web app breaks at this line: Line 17: GlobalConfiguration.Configure(WebApiConfig.Register); Error message: Could not load file o...
Baptist asked 27/5, 2014 at 15:16

1

Solved

I am working on my first MVC project and using attribute routing within my controllers. I am having a slight issue with one of my actions which has two possible route paths. The routes themselves a...
Denunciate asked 14/8, 2014 at 20:24

2

Solved

I'm using Azure SDK 2.2 and created a brand new MVC 5 web project. I added dotless, bootstrap-less (and subsequently updated to the latest LESS from getbootstrap.com), and font-awesome. I'm updated...
Fortdefrance asked 21/2, 2014 at 16:46

1

Solved

I have the following entity (domain) object and model that contain an enum. The display name appears correctly and works for a EnumDropdownList but for some reason not for the DisplayFor helper, al...
Mabe asked 20/6, 2014 at 19:58

2

Solved

How can I reset password as a admin for other users? I have tried using the code below var code = await UserManager.GeneratePasswordResetTokenAsync(user.Id); var result = await UserManager.ResetP...
Depopulate asked 21/5, 2014 at 12:31

2

Solved

I can't find or figure out how to take a list of items (cupcakes) and display them in razor with a quantity field. What is happening is I am not able to get the values for each cupcake quantity i...
Basinger asked 10/6, 2014 at 21:4

2

Solved

Castle.Proxies.IdentityUserLogin: : EntityType 'IdentityUserLogin' has no key defined. Define the key for this EntityType. I am trying to setup tests for my MVC 5.1 project which uses EntityFram...
Boatwright asked 7/4, 2014 at 8:45

1

Solved

I have an ASP.NET MVC5 application with the generated startup configuration for using OWIN. The user logs in to my application, keeps the browser opened but if he tries to access it the next day, ...
Pliny asked 7/4, 2014 at 14:34

1

Solved

Using Identity 2.0 After registering a user, the user is created in the database, there is code in the Account controller to create an identity and sign the user in. This is when I get the error. H...

1

Using the library AttributeRouting, I was able to configure attribute routing to use a custom route handler (inheriting MvcRouteHandler): routes.MapAttributeRoutes(cfg => { cfg.UseRouteHandle...

2

I am testing ASP MVC routes. I am having an issue with attribute routes in ASP MVC 5.1 When I have a controller like this: public class FooController : Controller { [Route("foo")] [HttpGet] pu...

1

Solved

I've got an MVC 5.1 site with a controller with a single POST action. I have an Android app that I want to POST to it using basic authentication. I created a BasicAuthorizeAttribute class and appli...
Dup asked 11/3, 2014 at 20:24

1

I have a view model which I am inheriting from a base class view model. I am trying to change the DisplayName metadata in the inherited class but it's not working. Here are the view models: names...
Settles asked 4/3, 2014 at 11:23

1

Solved

Hi I am working with Web Api 2, is their any way I can handle request and response before reaching to the API controller.

1

Solved

AutoFac has recently been updated for MVC 5.1 but at the time of writing I find that the documentation is lacking (especially for a simple example). I would like to inject dependencies into MVC Co...

1

Solved

We have an MVC 5.1 project and are using attribute routing. Everything is working fine except the default page which has a login form on it. [RoutePrefix("Home")] public class HomeController : Ba...

© 2022 - 2024 — McMap. All rights reserved.