Questions tagged [asp.net-core-3.0]
Use this tag for questions specifically related to ASP.NET Core 3.0, in addition to using the 'ASP.NET Core' tag.
asp.net-core-3.0
849
questions
2
votes
2
answers
816
views
My Entity Framework Core API works fine locally, but fails with a 405 error in production
I have a .NetCore 3.1 API project that uses Entity Framework.
It is working perfectly when I run it locally from Visual Studio.
However, after publishing to a production IIS 8.5 server, I get the ...
1
vote
1
answer
789
views
How to rewrite EF LINQ query that used to work in .NET Core 2.0 but doesn't in 3.0?
I am developing an online shop in .NET Core 3, following some tutorials delevoped with .NET CORE 2. EF LINQ is erroring after trying to execute this simple line of code:
var stocksToUpdate = _context....
0
votes
1
answer
774
views
.NET Core 3 dependency injection in custom validation [duplicate]
I want to make a custom validation attribute in .NET Core called CheckIfEmailExists. I want to make sure the user is not in my database already. So this is my create user view model:
public class ...
-1
votes
3
answers
2k
views
Display Image using Image Path isn't Working
I saved user image to a folder in my wwwroot folder and saved the image path to my database, Razor Pages, now i want to display the same image using the image path, its not working.
Here is my code ...
1
vote
1
answer
3k
views
ASP.NET Core and SAML authentication
I should implement authentication by ADFS on my ASP.NET Core 3 application. This application should use SAML2 for it. I found nice example of Sustainsys.Saml2.AspNetCore2 usages at this repository, ...
5
votes
2
answers
4k
views
Entity framework not detecting jsonb properties changes in c#
I am using Entity Framework Core with npgsql postgresql for Entity Framework Core.
and i'm working with .net core 3
My question is, when i try to update a MyTableRelated element from the MyTableClass ...
20
votes
2
answers
9k
views
How to enable/use/configure WebAssembly Blazor in existing .NET MVC Project?
I have a web application that is written in .net core MVC, a standard, "old school" web application using model/view/controller pattern. In this app I have a few complex forms which change based on ...
0
votes
1
answer
307
views
Ignore an exception in an API controller so that the controller still processes the request
I have a simple controller than processes a POST request and then sends out an email.
I want to ignore any exceptions caused by the function that handles sending out the email so that I can still ...
0
votes
2
answers
397
views
Why do I get these warnings/errors when I clone this project from my team on Github. It's only on my machine
I cloned the project from my teammates, they don't get this error but I do. Why and how can I fix this?
5
votes
1
answer
7k
views
How to inject an IServiceScope into a class in .NET Core
I have a problem with injecting Microsoft.Extensions.DependencyInjection.IServiceScope into my class.
My service implementation:
public class AccountService : IAccountService
{
private readonly ...
1
vote
3
answers
2k
views
.NET CORE 3.0 GetTokenAsync Authorization issue
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Authorization: Bearer MyMagicToken
Connection: keep-alive
Content-Length: 103
Content-Type: ...
5
votes
2
answers
3k
views
Azure App Service -- Web.config changes being overwritten
I have made changes to the web.config via Kudu for a .NET core 3.0 application running on Azure App Service, yet it seems when the site is deployed via Azure pipelines those changes I've made within ...
9
votes
1
answer
15k
views
'MySQLDbContextOptionsBuilder' does not contain a definition for 'ServerVersion'
I've applied ASP.NET Core 3.1 in my project and I want to create database by code-first approach and use MySQL.
In startup.cs file I got this error:
CS1061 'MySQLDbContextOptionsBuilder' does not ...
0
votes
1
answer
1k
views
Use latest version of Application Insight with .net core API
I have an existing API project in .net core 3.0 and also using exception middleware to log the exception. Now there is an requirement that we need to implement application insight in our API. I go ...
3
votes
1
answer
1k
views
How to change JWT timeout for dotnet core SPA (Angular) with Identity Server
I'm using dotnet core 3, and trying to set the JWT expire time, and can't find where to do so. I know it can be done where the JWT token is created, but that's happening in one of Microsoft's ...