All Questions
Tagged with asp.net-core-3.0 asp.net-core-3.1
35
questions
0
votes
1
answer
172
views
ASP.NET CORE 3 frombody NULL with Bootstrap Table plugins
I'm trying to do based on this example in the bootstrap table
query params. But the parameter I received always NULL, even I already set it before calling backend. I expect the value received should ...
0
votes
1
answer
196
views
Forgot password not working for .NET Core 3.x and React scaffold
I have a project in .NET Core 3.1 and the frontend with React.
It was generated using the scaffold instructions from this link.
When I try to trigger forgot password action, it shows a success page ...
0
votes
1
answer
2k
views
How to call Session variables in another project in the Same Solution Asp .NET Core 3
I am running multiple projects in my system, as shown below:
Startup project is Project 1
BLL Project (in this project I am setting the session)
Common Project (in this project only I want to call ...
2
votes
1
answer
966
views
Is it possible to validate a property using data-annotation asynchronously with ASP.NET Core?
I have an asp.net core 3.1 based project. I need to add a custom validation rule that will require a database call in ordered to determine the validity of the value.
For example, when creating a new ...
0
votes
2
answers
1k
views
Is it possible to execute code after the ServiceProvider is created?
I have an ASP.NET Core 3.1 WebApi based project that is written in C#. I want to execute code once when the app is finished bootstrapping.
For example, I want to execute the following code once the ...
3
votes
3
answers
1k
views
the type or namespace name 'RuntimeCompilation' does not exist in the namespace 'Microsoft.AspNetCore.Mvc.Razor'
If I write this line of code, services.AddMvc().AddRazorRuntimeCompilation(), in startup.cs and while publishing the project from Visual Studio 2019 on Azure, I encounter this error:
The type or ...
0
votes
1
answer
521
views
Use generics in AddTransient method in Asp.Net Core
Using Asp.Net Core I have the following:
services.AddTransient<Context>(x => new Context("my connection", new ContextMapper()));
I would like to use an extension method and generics so I ...
4
votes
1
answer
4k
views
log request for "CORS policy execution failed"
My ASP.NET Core 3.0 in a particular configuration/deployment logs:
[INF] CORS policy execution failed.
[INF] Request origin https://bla.com does not have permission to access the resource.
How ...
4
votes
1
answer
6k
views
415-Unsupported-Media-Type when posting a form using ajax to a ASP.NET Core 3.1 controller
I have an ASP.NET Core 3.1 based project where I validate forms using jQuery-Unobtrusive and jQuery-Unobtrusive-AJAX. When the form is submitted, I get an HTTP 415 error.
Follow is my controller's ...
0
votes
1
answer
366
views
Net Core 3.1 Razor Pages Multiple Nested Many to Many queries with Linq
I'm using .NET Core 3.1, which has some differences to pre .NET Core 3.0 around Linq queries from what I can gather: https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-3.0/breaking-changes#...
1
vote
1
answer
204
views
SignalR makes a lot of re-reconnections after migration to asp.net core 3.1
After migration from asp.net core 2.1 to asp.net core 3.1 SignalR behaves in a different way.
After 30 seconds of idle, I get re-connections with negotiating queries like negotiate?negotiateVersion=1 ...
1
vote
1
answer
2k
views
Render RDLC as PDF or Excel in Aspnet Core
I heard of rendering RDLC being impossible (or not easy) in aspnet core 2.
Is it possible to render an RDLC as PDF or Excel in Aspnet Core 3.0 or 3.1 ?
PS: But I have a working code in Aspnet MVC 5 ...
2
votes
1
answer
1k
views
How do I set cookie to be secure .NET Core?
I've run into problems using Identity Server 4. It's the common problem that requires SameSite=None and secure cookies. While I managed to set SameSite to None, I didn't set cookies to be secure.
I ...
6
votes
3
answers
17k
views
How to enable Cors for every type of request in asp.net core 3.1
How to enable Cors for every type of request in asp.net core 3.1?
I am following the MS Docs but they seem to not work.
Note: I am able to achieve cors for specific domains but not to every domain. ...
49
votes
2
answers
18k
views
ASP.Net Core exclude published language directories other than english
I publish my ASP.Net Core 3.1 Server like this:
dotnet publish --configuration Release --runtime win7-x64 -p:PublishTrimmed=true --output c:\MyServer
What I get in c:\MyServer is a lot of ...