Top "Asp.net-core-mvc" questions

ASP.

ASP.NET Core Identity - get current user

To get the currently logged in user in MVC5, all we had to do was: using Microsoft.AspNet.Identity; [Authorize] …

c# asp.net-core asp.net-core-mvc asp.net-identity
How to run stored procedures in Entity Framework Core?

I am using EF Core 1.0 in an ASP.NET Core App. Can you please point me to the proper way …

asp.net-core asp.net-core-mvc entity-framework-core
ASP.NET Core form POST results in a HTTP 415 Unsupported Media Type response

Sending a form POST HTTP request (Content-Type: application/x-www-form-urlencoded) to the below controller results into a HTTP 415 Unsupported Media Type …

c# asp.net-core asp.net-core-mvc
How do I access Configuration in any class in ASP.NET Core?

I have gone through configuration documentation on ASP.NET core. Documentation says you can access configuration from anywhere in the …

c# asp.net-core asp.net-core-mvc
How to get current url in view in asp.net core 1.0

In previous versions of asp.net, we could use @Request.Url.AbsoluteUri But it seems it's changed. How can we …

asp.net-core asp.net-core-mvc asp.net-core-1.0
Unable to create migrations after upgrading to ASP.NET Core 2.0

After upgrading to ASP.NET Core 2.0, I can't seem to create migrations anymore. I'm getting "An error occurred while calling …

c# asp.net-core asp.net-core-mvc entity-framework-core asp.net-core-2.0
ASP.NET Core Get Json Array using IConfiguration

In appsettings.json { "MyArray": [ "str1", "str2", "str3" ] } In Startup.cs public void ConfigureServices(IServiceCollection services) { services.AddSingleton<IConfiguration>(…

c# asp.net-core asp.net-core-mvc
Custom Authentication in ASP.Net-Core

I am working on a web app that needs to integrate with an existing user database. I would still like …

c# asp.net authentication asp.net-core asp.net-core-mvc
Publish to IIS, setting Environment Variable

Reading these two questions/answers I was able to run an Asp.net 5 app on IIS 8.5 server. Asp.net vNext …

iis asp.net-core visual-studio-2015 asp.net-core-mvc
How to get the Development/Staging/production Hosting Environment in ConfigureServices

How do I get the Development/Staging/production Hosting Environment in the ConfigureServices method in Startup? public void ConfigureServices(IServiceCollection …

c# asp.net-core asp.net-core-mvc