I want to get the current user, so I can access fields like their email address. But I can’t do that in asp.net core. This is my code: HttpContext...
How can I set the base path in ConfigurationBuilder in Core 2.0. I have googled and found this question, this from Microsoft docs, and the 2.0 docs online but...
Problem I want to return a file in my ASP.Net Web API Controller, but all my approaches return the HttpResponseMessage as JSON. Code so far public async Task<HttpResponseMessage> DownloadAsync(string...
I’m building a .NET Core MVC on the latest version 2.2. I have a problem when I make changes to the CSHTML file and refresh the page, my changes...
I am doing a quick stress test on two (kinda) hello world projects written in node.js and asp.net-core. Both of them are running in production mode and without a...
Having the following service constructor public class Service : IService { public Service(IOtherService service1, IAnotherOne service2, string arg) { } } What are the choices of passing the parameters...
This is my controller: public class BlogController : Controller { private IDAO<Blog> _blogDAO; private readonly ILogger<BlogController> _logger; public BlogController(ILogger<BlogController> logger, IDAO<Blog> blogDAO) { this._blogDAO = blogDAO; this._logger = logger;...
I started to convert my asp.net core RC1 project to RC2 and faced with problem that now IHttpContextAccessordoes not resolved. For sake of simplicity I created new ASP.NET RC2...
I’m looking for the correct way to return JSON with a HTTP status code in my .NET Core Web API controller. I use to use it like this: public...
I need some help with the select tag helper in ASP.NET Core. I have a list of employees that I’m trying to bind to a select tag helper. My...