26
votes
5answers
18k views

Create and Run MVC 5 Project in VS 2012

For some reason my Visual Studio 2013 Preview cannot create MVC 5 Projects. Since the MVC project is now open source in CodePlex I was wondering if there's a simple way to develop MVC 5 projects in my ...
21
votes
4answers
6k views

How to change type of id in Microsoft.AspNet.Identity.EntityFramework.IdentityUser

(ASP.NET MVC 5, EF6, VS2013) I'm trying to figure out how to change the type of the "Id" field from string to int in the type: Microsoft.AspNet.Identity.EntityFramework.IdentityUser in order to ...
34
votes
3answers
14k views

upgrading from MVC4 to MVC5 pre-Release

I have made that dreadful error of upgrading from MVC4 to MVC5 pre-release by updating the razor, and mvc webpage in my references I have System.Web.Mvc, System.Web.Webpages, System.Web.Webpages.Razor ...
28
votes
1answer
4k views

What is ASP.NET Identity's IUserSecurityStampStore<TUser> interface?

Looking at ASP.NET Identity (new membership implementation in ASP.NET), I came across this interface when implementing my own UserStore: //Microsoft.AspNet.Identity.Core.dll namespace ...
39
votes
7answers
9k views

ASP.NET Identity with EF Database First MVC5

Is it possible to use the new Asp.net Identity with Database First and EDMX? Or only with code first? Here's what I did: 1) I made a new MVC5 Project and had the new Identity create the new User and ...
19
votes
5answers
4k views

Get ExtraData from MVC5 framework OAuth/OWin identity provider with external auth provider

I'm trying to use the new MVC5 framework in VS 2013 preview. The membership authentication framework has been overhauled and replaced with OWin. In particular, I turned on external authentication ...
28
votes
1answer
5k views

What is the advantage of using async with MVC5?

What is the difference between: public ActionResult Login(LoginViewModel model, string returnUrl) { if (ModelState.IsValid) { IdentityResult result = ...
12
votes
6answers
7k views

How to access Facebook private information by using ASP.NET Identity (OWIN)?

I am developing a web site in ASP.NET MVC 5 (using RC1 version currently). The site will use Facebook for user authentication and for retrieving initial profile data. For the authentication system I ...
34
votes
5answers
17k views

How to get current user, and how to use User class in MVC5?

How can I get the id of the currently logged in user in MVC 5? I tried the StackOverflow suggestions, but they seem to be not for MVC 5. Also, what is the MVC 5 best practice of assigning stuff to ...
30
votes
3answers
7k views

Is ASP.NET MVC 5 incompatible with the WebMatrix SimpleMembershipProvider?

We have an existing application that was build on ASP.NET MVC 4 & Web API. The admin parts of the site use Simple Membership. I'm interested in upgrading the application to MVC 5 / Web API 2, to ...
6
votes
7answers
4k views

Updating user data - ASP.NET Identity

I've added custom fields to the ApplicationUser class I've also created a form through which the user can enter/edit the fields. However for some reason I'm not able to update the fields in the ...
5
votes
3answers
2k views

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 ...
25
votes
4answers
5k views

No ASP.NET MVC 5 Web Application Template on VS 2012?

I'm using Visual Studio 2012 and have just installed "Microsoft ASP.NET and Web Frameworks 2013.1 - Visual Studio". As expected, it added the option to create an "ASP.NET MVC 5 Empty Project". The ...
2
votes
2answers
2k views

How do i retrieve the email address when using google auth in mvc 5?

I have enabled Google Auth only within my asp.net mvc 5 app. I see that when I am redirected to googles auth screen I am asking for permission to view the users name and email address. I then return ...
6
votes
3answers
4k views

MVC 5 Owin Facebook Auth results in Null Reference Exception

I'm trying to setup integrated OWIN Facebook authentication in a new MVC 5 project in Visual Studio 2013. I have configured apps and keys as per this tutorial: ...
233
votes
1answer
87k views

What is new in asp.net mvc 5 [closed]

Today on twitter I saw a tutorial for ASP.NET MVC 5. I didn't know it existed. So, what are the new, cool features of MVC 5? What are the biggest differences compared to MVC 4?
7
votes
5answers
7k views

MVC 5 Access Claims Identity User Data

I am developing an MVC 5 web application using Entity Framework 5 Database First approach. I am using OWIN for the authentication of Users. Below shows my Login method within my Account Controller. ...
1
vote
1answer
2k views

How to extend asp.net web api 2 user?

I'm building a Web API (2) project and use "individual account" authentication. I want to extend user with some details (like first name/last name, etc) (in model) obtain that info after login (on ...
13
votes
2answers
2k views

How to add MVC 5 authentication to Unity IoC?

I'm currently working on implementing the new ASP.NET MVC 5 out-of-the box authentication into my application. However when using Unity as my IoC, I cannot use any portion of the AccountController ...
12
votes
3answers
4k views

In ASP.NET MVC what is the best show unhandled exceptions in my view?

I have the following in my web.config: <customErrors mode="On" defaultRedirect="Error"> <error statusCode="404" redirect="Error/NotFound" /> </customErrors> I have a ...
4
votes
2answers
4k views

Decoupling Microsoft.AspNet.Identity.*

I am working in Visual Studio 2013 RC and am testing Forms Authentication using new Microsoft.AspNet.Identity.* packages. I would to integrate these concepts (Users, Roles, etc, etc) but want to use ...
12
votes
4answers
7k views

Actionresult vs JSONresult

I have 2 questions: What is the difference between JSONResult and ActionResult? When to use JSONResult in MVC?
2
votes
1answer
282 views

UserManager.Create(user, password) thowing EntityValidationError saying Id is required?

Anybody know why UserManager.Create(user, password); might be throwing EntityValidationError saying Id is required. Could it have something to do with my UserManager. It is setup like this: public ...
2
votes
2answers
2k views

ASP.NET Identity vs Simple membership Pros and Cons?

In MVC4 we had Simple Membership. My opinion is that Simple Membership was a good Identity Model tried and tested with good documentation and didn't need to be fixed but simply needed an upgrade in ...
2
votes
3answers
179 views

Users with different capabilities

I'm creating an ASP.Net MVC 5 application. In my website, 3 different types of users exist. Admin Normal users Restaurants Each of these users have its own capabilities and access rights. Meaning, ...
1
vote
2answers
154 views

Is there a way to create a custom User and Role without specifying the TKey on IdenitityUser, IdentityRole, and IdentityDbContext?

Is there a way to create a custom User and Role without specifying the TKey string in IdentityUser, IdentityRole, and IdentityDbContext? I ask because it seems to think I don't want the auto-generated ...
0
votes
2answers
2k views

How to Extend Microsoft.AspNet.Identity.EntityFramework.IdentityRole

I want to be able to extend the default implementation of IdentityRole to include fields like Description. It's easy enough to do this for IdentityUser because IdentityDbContext takes a generic ...
12
votes
2answers
4k views

Can I run MVC 5 application on .NET Framework 4.0?

I have my MVC 5 application that I create in VS 2013. Now I'm trying to deploy this application and I have a question: Can I deploy MVC 5 on the server with 4.0 .Net Framework? I just create Deploy ...
7
votes
2answers
731 views

After update to MVC 5, iframe no longer works

I updated my project MVC version to 5 and now iFrame does not load, I get this error: Load denied by X-Frame-Options: www.blahblah.com does not permit cross-origin framing. I noticed that for some ...
3
votes
1answer
2k views

MVC 5 Custom UserStore

I need to build a custom UserStore (basically because I have some requirements that are not part of the framework by default) but I can not find any documentation anywhere on how to do this. I have ...
1
vote
1answer
70 views

MVC Route Map Got Exception on Html.RenderAction : No route in the route table matches the supplied values

I use ASP.NET MVC 5 and this is My Route Map for all of the actions except Home/index: routes.MapRoute( name: "randomNumber", url: ...
1
vote
0answers
47 views

Syndication keys missing MVC

Really need some help with this one.... I'm trying to get my MVC app to use the Syndication library for the RSS feed reader part of my program and got stuck while trying to enable migrations saying ...
1
vote
1answer
1k views

I can't seem to get a very basic cookie login example to work with MVC5 and OWIN

I've been trying to get my feet wet with ASP.net MVC 5 for 2013, but so far I've failed to get even the most basic authentication working correctly. I've been reading around for the last few days and ...
18
votes
3answers
10k views

Custom Membership with Microsoft.AspNet.Identity - CreateLocalUser fails

I've been trying to implement a custom version of the new Identity features in ASP.NET 4.5 (Microsoft.AspNet.Identity), using Visual Studio 2013. After many hours of playing around with this, I've ...
13
votes
1answer
2k views

Decoupling ASP.NET MVC 5 Identity to allow implementing a layered application

I'm new to ASP.NET MVC and I've been developing a MVC 5 application with individual user authentication. I've been doing a layered pattern when doing my applications like separating Model layer, DAL ...
10
votes
2answers
6k views

MVC5 Claims version of the Authorize attribute

I'm trying out some of the new stuff in VS2013 RC with MVC5 and the new OWIN authentication middleware. So, I'm used to using the [Authorize] attribute to limit actions by role but I'm trying to use ...
9
votes
1answer
804 views

Login page on different domain

I am completely new to OWIN authentication, and I must be misunderstanding how everything works, but I can't find this mentioned anywhere. All I want is to be able to use a central domain for ...
17
votes
2answers
7k views

ASP.NET Identity DbContext confusion

A default MVC 5 App comes with this piece of code in IdentityModels.cs - this piece of code is for all the ASP.NET Identity operations for the default templates: public class ApplicationDbContext : ...
15
votes
3answers
4k views

Email Confirmation with MVC 5 and Asp.net Identity

I have been searching, but have not found any documentation on how to implement Email confirmation with MVC 5 using the new ASP.net Identity. There does not seem to be any documentation on this topic ...
4
votes
4answers
5k views

Setting up Forms Authentication for multiple Web Apps in MVC 5 based on OWIN

I am in process of setting up my 1st MVC Web App. I know I need to provide a Forms Based Authentication model as well as I know I will be reusing it for multiple other internal web apps as well. All ...
5
votes
2answers
3k views

ASP.Net Identity in MVC5 set up connection string

I have an MVC5 app that's using EF. I would like to add ASP.NET Identity and I've noticed that the connection string for ASP.NET identity is using "DefaultConnection". What Do I need to do so that ...
5
votes
1answer
1k views

How to bind view model property with different name

Is there a way to make a reflection for a view model property as an element with different name and id values on the html side. That is the main question of what I want to achieve. So the basic ...
2
votes
3answers
3k views

How to create custom scaffold templates in ASP.NET MVC5?

I'm using ASP.NET MVC5 and VS2013 I've tried to copy CodeTemplates folder from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\VWDExpress\ItemTemplates\CSharp\Web\MVC ...
2
votes
1answer
2k views

MVC 5 Role Based Authentication

I am trying to lock down our "admin" page to only admins using Asp.net Identity (we are building in MVC5). I can get [Authorize(Users="admin")] to work but can not get [Authorize(Roles="Admin")] to ...
1
vote
2answers
3k views

MVC5 ApplicationUser custom properties

I am trying to get to grips with the new Membership system introduced in ASP.NET MVC 5 and I've come across a small issue which I am pretty sure you will be able to help me with. I am going based off ...
10
votes
2answers
483 views

Should I use Data Cache or Output Cache for a complex navigation menu?

I am attempting to cache sections of a navigation menu according to different criteria. For example, news and articles need to be refreshed on a duration basis, whereas login and profile stuff ...
7
votes
4answers
10k views

HTTP Error 500.19 and error code : 0x80070021

I have simple webapi build by Visual studio 2013.it work good when i run it from VS13 but when i copy the project in local IIS it give me following error HTTP Error 500.19 - Internal Server Error ...
5
votes
1answer
2k views

How to get Facebook first and last name values using ASP.NET MVC 5 and OWIN?

I know that a 'Name' field is provided, but I would prefer to access the first and last names explicitly. Can someone help with this? I'm still wrapping my head around ASP.Net MVC.
4
votes
2answers
2k views

MVC 5 -> MVC 5.1 Migration. Intellisense issues

I just updated my project to MVC 5.1 from MVC 5. The main web.config file got updated automatically, but web.configs under main View and Areas folders weren't changed. I suspect that's why now I lost ...
4
votes
4answers
1k views

How can one put application users in the same context as the rest of the objects?

The stock asp.net mvc 5 application creates the application users, aka identity users in a separate context, named a file called "IdentityModels.cs" - it looks like this public class ...