Top "Asp.net-core" questions

ASP.

Get ConnectionString from appsettings.json instead of being hardcoded in .NET Core 2.0 App

I have the following class in NET Core2.0 App. // required when local database does not exist or was deleted public …

c# asp.net-core connection-string appsettings
How to enable CORS in ASP.NET Core

I am trying to enable cross origin resources sharing on my ASP.NET Core Web API, but I am stuck. …

c# asp.net-core
Send HTTP POST message in ASP.NET Core using HttpClient PostAsJsonAsync

I want to send dynamic object like new { x = 1, y = 2 }; as body of HTTP POST message. So I try to …

c# asp.net-core .net-core
How to register multiple implementations of the same interface in Asp.Net Core?

I have services that are derived from the same interface. public interface IService { } public class ServiceA : IService { } public class ServiceB : …

c# asp.net-core asp.net-core-mvc coreclr
Return file in ASP.Net Core Web API

Problem I want to return a file in my ASP.Net Web API Controller, but all my approaches return the …

c# asp.net-core .net-core asp.net-core-webapi
The default XML namespace of the project must be the MSBuild XML namespace

I cloned the ASP.NET Core SignalR Repo locally, and try opening the solution from within the following environment. IDE …

asp.net-mvc asp.net-core visual-studio-2015 msbuild .net-core
How to return a specific status code and no contents from Controller?

I want the example controller below to return a status code 418 with no contents. Setting the status code is easy …

c# asp.net-core asp.net-core-mvc asp.net-core-webapi
How do I get client IP address in ASP.NET CORE?

Can you please let me know how to get client IP address in ASP.NET when using MVC 6. Request.ServerVariables["…

c# asp.net-core asp.net-core-mvc
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