Category "asp.net-core"

SignalR hub with Bearer authentication

I have a problem. I have in my API JWT Bearer authentication. I try to use SignalR hub with authentication but it doesn't work for me. I think I tried everythin

How to turn off or handle camelCasing in JSON response ASP.NET Core?

I'm running through a WintellectNOW course on ASP.NET Core/Web API/Angular 2. I have the API portion implemented, but for whatever reason, the JSON that is bein

.NET Core: How can I set the connection string?

I am trying to use Blazor's CRUD functions and following some article to do this. In the article, there is a part that I should put my connection in context fil

SqlDataAdapter missing in a ASP.NET Core project

I'm trying to get a connection to a database without Entity Framework, using ADO.NET in a .NET Core 1.0 project. using System; using System.Collections.Generic

"No files matched the search pattern" in tfs build

I want to build my project from TFS Azure(VSTS). I have made one project which is under Asp.Net Core. I have made Build definition with Asp.Net Core Template a

Use FilePond with .NET Core

I want to use FilePond with .Net Core like I use an I use MVC and this is the action in my controller which is ran when I submit a form : public async Task<

How do ASP.NET Core's "asp-fallback-*" CDN tag helpers work?

I understand what the asp-fallback-* tag helpers do. What I don't understand is how. For example: <link rel="stylesheet" href="//ajax.aspnetcdn.com/aja

The right way to DI NpgsqlConnection postgreSQL with multiple connectionString in ASP.NET Core 3.1

I'm struggling to register DI NpgsqlConnection() with multiple connection strings in ASP.NET Core 3.1, Dapper v2.0.78 & Postgres v11. I will provide the cur

VS Code CSC : error CS1617: Invalid option '7.3' for /langversion

I downloaded VS 2017 15.7, .NET Core 2.1.2 and Blazor to try it out. It wasn't working in VS 2017 properly and thought I would try through the dotnet cli and V

ASP.NET CORE 2.1 Server timeout while debugging

'Error: Server timeout elapsed without receiving a message from the server.'. I'm trying to debug some server-side code and while I do that the client ge

How to propagate Always encrypted column encryption to Test, Acceptance and Production?

We are using Always encrypted in a .Net core application. The Sql Server database is maintained with EF-core migrations. I was wondering how to propagate the co

Simple logging in .NET Core app on Elastic Beanstalk

I'm just starting to put some ASP.NET Core apps on Elastic Beanstalk. I want to do some simple logging initially just to track down some issues. I normally use

notification does not implement $INotification C#

I have a multi-tenancy project using mediator and CQRS, for some reason my CRUD from order request are returning this error, I already try refactor my handler s

Trying to connect to wwwroot and get a image

I work in aspnet core mvc technology, I manage to add an image, it does go to wwwroot, but the image does not display well in the browser Example: enter image d

How to customize migration generation in EF Core Code First?

There is a special base table type in my DbContext. And when inherited from it I need to generate an additional "SQL" migration operation to create a specific t

Apparently Random Error: "Antiforgery token validation failed. The antiforgery cookie token and request token do not match."

Background I have a relatively new ASP.NET Core 2 site. It's running on just one server (Windows Server 2012 R2, IIS 8.5), and I only restart the site once eve

Docker container is not running on given port in dockerfile

I am trying to run my application on docker (Linux container). In my Dockerfile i'm exposing the port 80 Dockerfile FROM mcr.microsoft.com/dotnet/core/aspnet:3.

How to get only specific tables to create models from database with Entity Framework Core in C#

I'm using Scaffold-DbContext to create models from an existing database, but it auto pluralizes the table names and I don't want that. It also gets all the tabl

.net core injecting and resolving services

I am trying my hand at .net core web api. I have created a static method for registering my controllers like this: public static class RegistrationExtensions {

.Net 6 Blazor app UseHttpsRedirection is causing many redirects

I have a .NET 6 Blazor Server and another .NET 6 Blazor Wasm site. Both work fine locally but when hosted on a shared hosting site get an error 'too many redir