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
0
votes
0
answers
32
views
How to Resolve IWebHostEnvironment in .NET Core 8.0? [duplicate]
I'm working on migrating a project from ASP.NET Core 5.0 to .NET Core 8.0. In my project,
using Test_Site_1.Application.Interfaces.Contexts;
using Test_Site_1.Common.Dto;
using Test_Site_1.Domain....
0
votes
0
answers
50
views
How to get child model from database asp.net core?
I have a parent class "User" which inherits from "IdentityUser":
public class User : IdentityUser
{
public string Lastname { get; set; }
public string Name { get; set; }
...
-1
votes
1
answer
763
views
I need to set allowcredentials for a wildcard origin in .net core 3.0
options.AddPolicy("AllowAll",
builder => builder.WithOrigins("*")
.AllowAnyHeader()
....
3
votes
1
answer
5k
views
asp.net core - what are the differences of these MapRazorPages() calls?
Method 1
In ASP.NET Core 3.x, we add endpoints for Razor Pages with
app.UseEndpoints(endpoint =>
{
endpoint.MapRazorPages();
});
Method 2
In the ASP.NET Core 6 Web App template (minimal ...
0
votes
0
answers
326
views
System.ArgumentNullException: Value cannot be null. (Parameter 'items')
I'm trying to return a list of LeaveTypes from a model using DropDownListFor. I have found a few topics on this issue, so it seems to be common, and I presume the list needs to be repopulated, but I ...
0
votes
1
answer
187
views
View is not found when migrating from AspNet.Core 2.2 to 3.0
I have an Asp.Net Core 2.2 MVC application. I am trying to migrate to 3.0, using this documentation:
https://learn.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-6.0&tabs=...
16
votes
1
answer
18k
views
asp .net core 6 how to update option for json serialization. Date format in Json serialization
My apologies for the silly question, but I don't see a good example of how can I specify a specific format for DateTime in JSON serialization for .net core 6.
The old way, net core 3.
// in the ...
-1
votes
1
answer
92
views
Get varied columns from in Entity Framework 3.0
I have an ASP.NET Core MVC solution.
I tried to get dynamic object and uncertainly column numbers and types from a stored procedure.
I prepared the stored procedure, but I couldn't find a solution ...
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 ...
4
votes
3
answers
7k
views
Get the local path of a file in a virtual directory
I have an ASP.NET Core 3.0 MVC application with images in it. E.g.,
http://foo.bar/images/image.jpg
Now, the folder images is a virtual directory which is mapped to a network drive, such as \\192.168....
0
votes
1
answer
799
views
how to handle enums like strings and ints
I'm rewriting an api, switching from newtonsoft.json to system.text.json, and an issue i have is the fact that in some cases we send enums as ints and sometimes as strings.
Consider this example:
{
&...
0
votes
1
answer
718
views
Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=3.0.0.0
I am migrating my .NET standard 2.0 class library application to .NET core 3.0 where I want to start web API server from class library, Where class library application is getting launched with ...
4
votes
1
answer
3k
views
How to deserialize part of json using System.Text.Json in .net core 3.0?
I have a json from here https://api.nasa.gov/insight_weather/?api_key=DEMO_KEY&feedtype=json&ver=1.0 which looks like:
{
"782": {
"First_UTC": "2021-02-06T17:08:...
0
votes
0
answers
257
views
Site refused to connect on IIS Publish
I am publishing an ASP.Net Core 3.0 application in IIS. My publish profile looks like
This is how my web.config file is in publish folder
<?xml version="1.0" encoding="utf-8"?&...
0
votes
1
answer
808
views
Routing from an angular front end to an asp.net core 3.1 backend
So here is my backend .csproj. Im doing a front end spa in angular connecting to my backend in memory database. I can connect to my database from the URL of my back end application like in the image. ...