asp.net-core

update database call a specific migration

update database call a specific migration
I try to update my database after migration (V2 is the name of the migration) :dnx ef database update V2 -c DataContext -p InfrastructureI have an error because dnx try to execute all migrations et not just V2.Applying migration '20151127095324_V1' .

Redirect to URL in ASP CORE

Redirect to URL in ASP CORE
I have problem with redirect to another controler and action in application.My Redirect Action look like:public IActionResult Redirect(NotificationItemViewModel model) { NotificationItemToggleReadCommand command = new NotificationItemToggleReadComman

“k ef” throwing exception in Visual Studio 2015 Package Manager Console

“k ef” throwing exception in Visual Studio 2015 Package Manager Console
I'm new to the Package Manager Console. I have managed to install the KVM and am trying to create a migration in my ASP.NET 5 app.When I run "k ef" I get the following exception:k.cmd : System.ArgumentNullException: Value cannot be null. At line

Anchor tag helper not working in MVC 6 AND Angular js

Anchor tag helper not working in MVC 6 AND Angular js
I have a working new ASP.NET 5 project using MVC 6 andangularjs.My web page data binding are working as expected, but when I use an MVC 6 AnchorTagHelperin my project, data bindings are not working as expected.<div class="browse-movie-wrap col-lg-

How do I access my current user using IdentityServer4?

How do I access my current user using IdentityServer4?
I'm trying to build a SPA web app + IdentityServer4 + ASPNET Core + ASPNET Core Identity. I've followed the quickstarts on the Identityserver documentation and its really great. I'm more interested the quickstartIdentity Server Quickstart with JS Cli

Update dotnet cli in Mac OSX

Update dotnet cli in Mac OSX
Im'm trying to upgrade my dotnet cli. I have installed in my Mac (OS El Capitan) from the officiallink.But when I try to view the version with this code:dotnet --versionMy output:1.0.0-preview2-003121How can I upgrade?Thanks.The version 1.0.0-preview

Add migration from Package Manager vs dnx

Add migration from Package Manager vs dnx
I can add a migration from the console using dnx like so:dnx . ef migration add testBut I can't do it via Visual Studio's Package Manager Console, using the same line above. The error I get is:dnx : System.InvalidOperationException: Failed to resolve

AspNet Core router added extra URL segment

AspNet Core router added extra URL segment
I have been running into the issue where the AspNet Core router will add an extra segment to the URL when there is an error.For Example: The UseCookieAuthentication will redirect to /login but if there is an error then the router will direct me to /l

How to deploy or run NETCore.App 1.0.0-rc2-3002702

How to deploy or run NETCore.App 1.0.0-rc2-3002702
After I migrated my app to RC2 or to be very specific V. 1.0.0-rc2-3002702 I'm struggling with deployment of my app. I have noticed that folder "approot" in publish directory does not exist anymore and also with it "web.cmd" file. I ha

UseJwtBearerAuthentication fails with IDX10504: Unable to validate signature, token does not have a signature

UseJwtBearerAuthentication fails with IDX10504: Unable to validate signature, token does not have a signature
Using ASP.NET Core 1.0 (rtm), with the somewhatminimal verifiable samplethat I have produced, I am seeing that the JSON Web Tokens I produce are not passing the .net core json web token middleware claim challenge, and are failing with this error:Micr

Merge migrations in entity-framework-core

Merge migrations in entity-framework-core
Is it possible to merge all migrations files into one ?I created initial migration.dotnet ef migrations add InitialMigrationSourceWhen ever I have some model change I create new migration update.But now I have too many migration update files. Is ti p

Execute Gulp.js tasks post build in VS2015

Execute Gulp.js tasks post build in VS2015
I have a basic Asp.Net 5 site which used Gulp.JS tasks to clean, copy and minify CSS and JS files.When running these tasks in the Task Runner Explorer - all is good and the old scripts are removed, new ones copied and files minified.I wish to automat

Using IdentityServer vs creating custom JWT based authentication

Using IdentityServer vs creating custom JWT based authentication
Authentication is a bit over the top for me.My understanding is:Client performs loginAPI or authentication server responds with a tokenClient calls API (includes header which holds the token)API checks if the token is valid and if valid responds with

Importing bower component library into Angular 2 application

Importing bower component library into Angular 2 application
I am working on an Angular 2 application in ASP.NET Core and I am trying to import oidc-client (https://github.com/IdentityModel/oidc-client-js) into one of my Typescript files. The oidc-client files were installed via bower which placed them in the

Configuring Core 1.0 to target net45 and run IIS Express

Configuring Core 1.0 to target net45 and run IIS Express
I'd appreciate help configuring my MVC applications correctly to target .NET 4.5 using the latest ASPNET Core 1.0 tooling.I'm unable to get anything other than a 502.3 response from IISExpress after upgrading from Microsoft.AspNet.Mvc 6 RC to Microso

How to know the selected checkboxes from within the HttpPost Create action method?

How to know the selected checkboxes from within the HttpPost Create action method?
I have many-to-many relationship betweenStudentandCourse. The linking entity set isEnrollment. For the sake of simplicity, they are all defined as follows.Modelspublic class Course { public int Id { get; set; } public string Title { get; set; } publi

Issue a refresh token in aspnet5 rc1 Web API2 identity 3 using JwtBearerAuthentication

Issue a refresh token in aspnet5 rc1 Web API2 identity 3 using JwtBearerAuthentication
I'm currently stuck on the mechanics ofhow to implement a refresh token flow in aspnet5.Goal: I want to intercept every transaction to check if the token is expired or about to expire and if so, renew it. (I'm already validating the signature of it).

Project 'Unable to locate Dependency' on itself

Project 'Unable to locate Dependency' on itself
I'm trying to run the latestAsp.Net 5 samples(currently 1.0.0-rc1-update1) on my Ubuntu 14.04 VM guest using VirtualBox on Windows 10. The sample code is being run via shared host directory.I have the active and default DNX set as the CoreCLR x64.Whe

Form model not validating before POST

Form model not validating before POST
I'm trying to make a registration page in my web application. However, the validation on my form is not working. For example I have my password minimum length be 4 charterers but if I enter a blank password it still makes the POST request. How do I t

How to add a cookie to DefaultHttpContext

How to add a cookie to DefaultHttpContext
I have a function that expect HttpRequest as parameter:public string Read(HttpRequest req) { if (req.Headers["X-Requested-With"] == "XMLHttpRequest") { return req.Headers[ConfigurationManager.AppSettings["ajaxsession"]]; } re
What Others Are Reading