Skip to main content

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
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....
Amirhossein Rajaby's user avatar
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; } ...
Artem's user avatar
  • 77
-1 votes
1 answer
802 views

I need to set allowcredentials for a wildcard origin in .net core 3.0

options.AddPolicy("AllowAll", builder => builder.WithOrigins("*") .AllowAnyHeader() ....
user avatar
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 ...
Chow's user avatar
  • 33
0 votes
0 answers
327 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 ...
Mohamed Abdelhakim's user avatar
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=...
David Shochet's user avatar
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 ...
Sergii Zhuravskyi's user avatar
-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 ...
hkyaaa's user avatar
  • 100
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 ...
saf21's user avatar
  • 844
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....
Impostor's user avatar
  • 1,980
0 votes
1 answer
811 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: { &...
Tom's user avatar
  • 105
0 votes
1 answer
719 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 ...
PDTech's user avatar
  • 149
5 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:...
Galina Melnik's user avatar
0 votes
0 answers
261 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"?&...
Dot Net developer's user avatar
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. ...
Nuno Marques's user avatar
2 votes
1 answer
576 views

ASP.NET Core 3.0 MVC update model with list objects - add object

I have the following classes: public class Invoice { [key] public Guid InvoiceID { get; set; } public string Name { get; set; } public List<Invoice_item> Invoice_items { ...
Rafael Mark's user avatar
0 votes
0 answers
176 views

Get the host of the URL

I am made an API that works as it is intended, but to stop the direct use of the base URL of the API, there is another URL that masks the base URL but works the same. I need to return the URL that is ...
Ashwin Pandey's user avatar
1 vote
1 answer
735 views

Azure app service websocket buffer buffer size limits?

I have run into a problem where my websocket connection is functioning as expected locally, but not when deployed to azure app service. (.NET Core 3.0) I am able to receive messages of any size ...
eirikjor's user avatar
1 vote
1 answer
959 views

How to add data from async method in singleton in Startup.cs in net.core 3.0?

I'm trying to get async data from HttpClient and add this data as singleton at ConfigureServices in Startup.cs public static class SolDataFill { static HttpClient Client; static SolDataFill() ...
Galina Melnik's user avatar
0 votes
1 answer
624 views

How to install root certificate in aspnet:3.0 base image for windows container

I am hosting two windows containers from a Windows 2019 servers and both are running in https. When my Web URL container tried to make a call to the API container. It didn't work and when I got ...
AJD's user avatar
  • 1
0 votes
1 answer
1k views

Modal Pop-Up Displaying Incorrectly When ModelState.IsValid = false Redirect

I'm having an issue with my Modal Pop-Up displaying incorrectly when it fails model validation on HttpPost. When the Modal returns data and it fails validation, I want the screen to return to having ...
FlyFish's user avatar
  • 515
2 votes
0 answers
221 views

Consuming ws security soap service in .Net Core 3 api

I am consuming a SOAP service in .NET Core 3.0 API. This service uses WS-Security standard for authentication. Will the below code work with just the username and password provided to the client ...
Anjali VC's user avatar
1 vote
0 answers
153 views

Role Based Authorization not working .NET Core 3.0

Role-Based Authorization not working in my code, Please guide me if i am missing anything. My project is on .net core 3.0 framework. Authentication is working fine but authorization is not working. ...
R M's user avatar
  • 11
0 votes
1 answer
279 views

Map two identical models, nested with automapper

I did some research but I couldn't find exactly what I wanted. I have an endless menu. I have a MenuDTO and a MenuViewModel that I use for this menu. I had no problem matching between model and DTO, ...
hlmbsbyk's user avatar
1 vote
1 answer
131 views

Passing json through a controller

I have this back-end system that produces json. Is it possible to pass that data through a controller on request and correctly setting the mimetype? Everything I've tried so far tries to re-serialize ...
Jurgy's user avatar
  • 2,270
3 votes
1 answer
559 views

Return View as String in .NET Core 3.0

I am working on generating HTML to send to a PDF generator and discovered this this question on Stackoverflow. It points to Paris Polyzos and his article. Upon implementing the code in .Net Core 3.0,...
Sam Carleton's user avatar
  • 1,391
4 votes
1 answer
2k views

How to set up Client side validation for a custom RequiredIf attribute for Asp.NET Core 3.0

I was not able to get my client side validation method to fire after setting up the validation according to various sources. After lots of struggle I found that changing the order of when the scripts ...
Kellie's user avatar
  • 303
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 ...
Felipe Peña's user avatar
  • 2,828
1 vote
1 answer
2k views

Will two Azure Event Hub consumers get the same notifications?

I'm developing an Azure IoT web application that consumes events from an Azure Event Hub. I regularly publish the web application to Azure in a testing environment and then I also run the it in debug ...
Jon Th's user avatar
  • 357
0 votes
2 answers
468 views

Uploaded file have no content when uploaded from Remote IIS Server

I am trying to upload files to Google Drive using ASP.NET Core 3.0, here is my code to upload the file. GData.File fileMetadata = new GData.File() { Id = null, Name = Path.GetFileName(path), ...
Muhammad Jazab's user avatar
1 vote
1 answer
884 views

How can I tell when an update on an Azure IoT Hub device twin is finished?

I'm developing a web application that makes changes to device twins in an Azure IoT Hub. So the user of the web application can make changes to a device twin through my web and then he can query the ...
Jon Th's user avatar
  • 357
0 votes
0 answers
352 views

Azure Event Hub only sending device twin change notifications for SOME devices in IoT Hub

I have an Azure IoT hub containing a bunch of devices and I have linked the IoT Hub to an Azure Event Hub to subscribe for device twin changes. I then am developing a web application with a Microsoft....
Jon Th's user avatar
  • 357
0 votes
2 answers
834 views

Background image for card view isn't displaying

I want to display card views in my web page. The card view should have a background image, and below that there should be the Card title, and again below that there should be some short texts. Here's ...
Ransike Randeni's user avatar
0 votes
0 answers
201 views

How we can ignore writing file contents in RequestResponseLoggingMiddleware AspNetcore3

Is this correct way when I don't want to log the file data using the given condition, that the contentType is application/json or any other way is there to skip writing the file contents? if (context....
11738472's user avatar
  • 224
0 votes
1 answer
266 views

my web app gets translation from the french resource, idk why

I started some weeks ago to develop a web application using asp.net core 3.0, now I got to the phase where I must develop the localization service, to simplify my code, I will only write the new "...
bargo's user avatar
  • 67
0 votes
1 answer
437 views

ASP.Net Core 3 + React Web App - Seeing the resource busy error

Created a ASP.Net Core 3 web app with React using Visual Studio 2019. When I try to run the application in visual studio, I am seeing the following error. I tried running Visual Studio as ...
user2347528's user avatar
4 votes
1 answer
4k views

return JSON as is (PascalCase) from one Action

in asp.net core 3 the returned json will get automatically transformed to camelCase, and I know how to turn this off globally but how do I turn this off for one single action ? I know it was supposed ...
Omu's user avatar
  • 70.9k
1 vote
1 answer
782 views

How to get windows usernaame in ASP.NET Core 3.0

I'm trying to get windows user name in ASP.NET Core 3.0 I have found here many questions on this topic, but I cannot find any answer I could use. My app uses login-password authentication, but lot of ...
Lukas's user avatar
  • 103
2 votes
2 answers
1k views

Get Parameters along with controller and action name from endpoint

I have a HttpGet endpoint that takes in an id. I have figured out how to get the controller and action names but I am also wanting to get the parameters used in the endpoint because I want to be able ...
KangarooRIOT's user avatar
0 votes
1 answer
874 views

How to add custom form client-side validation in razor page and remove Chrome built-in validation

I'm developing a web application using NET Core 3 razor pages, my Login.cshtml page looks as follows: <div class="columns is-centered"> <div class="column is-6"> ...
Tofetopo's user avatar
  • 486
13 votes
3 answers
19k views

ASP.NET Core 3.0 Identity Server 4 (4.0.0) SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'empty'

I keep getting the following error between postman and IdentityServer 4 Microsoft.IdentityModel.Tokens.SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'empty'. ...
Zach Ioannou's user avatar
1 vote
1 answer
1k views

How to get access to Role of CurrentUser in angular UI ? using Abp v2.9

Currently I am using ABP version 2.9 (DonetCore, Angular, Mongo) project template. I need to have a logic to redirect user to different path based on user ROLE. What I see from the source [here], ...
Harry Sarshogh's user avatar
1 vote
1 answer
3k views

ASP .Net Core 3.0 - Log4Net MS SQL Server Appender not working

I am currently trying to use Log4Net to insert logs into a MS SQL Server DB. I believe I have Log4Net at least working because I was able to use the FileAppender option/example given Here and I was ...
KangarooRIOT's user avatar
4 votes
1 answer
3k views

Can you import a package targeting full framework into an ASP.NET Core 3+ application?

My understanding is that, starting with ASP.NET Core 3.0, .NET Framework is an unsupported target framework, and thus you can only run on the .NET Core runtime. If this is the case, what NuGet ...
kimsagro's user avatar
  • 16.8k
1 vote
0 answers
43 views

How to receive private messages from the stream using Socket.IO in .Net Core 3.0

I am trying to receive private meesages from SocketIO stream. I have IP address but I am getting problem in connection. Also, if connection will happen then also I have to authorize the connection ...
AnnyP's user avatar
  • 11
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 ...
Asif Ahmed's user avatar
2 votes
2 answers
294 views

Create nice url in asp.net core 3

I want to have a URL that looks like: if artCatId != null and tagId == null: /Article/artCatId/100/pageNumber/2 or if artCatId == null and tagId != null: /Article/tagId/200/pageNumber/3 and if ...
x19's user avatar
  • 8,663
0 votes
1 answer
3k views

calling signalr methods in javascript

I am trying to implement a segment in my .net core 3 web application that shows the number of online users in real-time. So the counter gets updated automatically without page refresh anytime a user ...
JK1990's user avatar
  • 63
1 vote
0 answers
335 views

upload with ftp to web api

I created a web api in asp.net core 3, I made it possible to send files to the web api, I'm looking for a way to upload a file to the web api by Ftp, I don't know if it's possible, If there is a way ...
mahsa mohamad zadeh's user avatar
1 vote
2 answers
432 views

API POST method to save a file to another system drive is throwing a 500 error

I have a .NetCore 3 API controller that can take a POST request. However, I want it to save the file on a different drive. F:\GameFiles\Media\UserScreens\Uploads I am setting the path in my ...
SkyeBoniwell's user avatar
  • 6,935

15 30 50 per page
1
2 3 4 5
17