Questions tagged [.net-core]

.NET Core, a remarkable software creation by Microsoft, emerges as an avant-garde open-source substitute for the renowned .NET Framework. Its versatility knows no bounds as it seamlessly adapts to countless applications and verticals, catering to servers, data centers, and even our beloved apps and devices. The beauty lies in its widespread compatibility, extending support from Windows to Linux and macOS operating systems.

Starting a fresh ABP project using the latest v8 CLI comes with a new feature - when you run the command "abp install-libs", it now automatically generates an

Currently, I am attempting to run ABP on macOS Sonoma using .NET Core 8. Everything seems to be working fine except for the fact that the AuthServer is lacking any styling. I made sure to install npm and yarn with the correct versions, and then executed t ...

Selenium Chromedriver seems to be spawning numerous instances despite the need for just one

As someone new to Selenium and still in the learning process, I apologize if I come across as naive. We are currently trying to execute our Selenium tests on a specific machine through IIS. Strangely, when running the code locally, everything operates pe ...

Is it possible for JSON deserialization to fail within a Controller action, yet succeed when performed explicitly?

Seeking clarification on a matter that has puzzled me. While my controller actions usually handle JSON deserialization to C# objects smoothly, there is currently an issue I am grappling with. Instead of producing the expected outcome, it presents a QBWebho ...

"Encountered a 'net::ERR_HTTP2_PROTOCOL_ERROR' while trying to load a resource for a React app following an upgrade to Visual Studio 2019 version 16.10.0

Since upgrading to VS 16.10.0 (and then 16.10.1) Community Edition, a React website is no longer functioning within Visual Studio/IIS Express. Interestingly, the exact same code runs perfectly when deployed to an Azure app service. Upon loading the home p ...

Is it possible to insert data into SQL Server from an Angular application without relying on .NET Core?

Is there a way to extract data from an Angular-made form and store it in a SQL Server table without the need for .NET Core? ...

Discovering the ASP.NET Core HTTP response header in an Angular application using an HTTP interceptor

I attempted to create a straightforward app version check system by sending the current server version to the client in the HTTP header. If there's a newer version available, it should trigger a notification for the user to reload the application. Ini ...

Angular's two-way binding feature does not seem to be updating the value for date

In my Angular - Dotnetcore 2.0 form, users are required to update their demographic information including their birth date. Initially, I was using the following code snippet to display the birthdate: <input id="dateOfBirth" type="date" class="form-cont ...

What is the equivalent of the DataSource attribute for mstest in .NET Core?

Is DataSource attribute supported in .NET Core projects of MSTest? If not, what is the alternative? For more information, visit: https://learn.microsoft.com/en-us/visualstudio/test/how-to-create-a-data-driven-unit-test?view=vs-2019 Note: In .NET Core, th ...

.Net Core receives the method name instead of the parameter value passed by TypeScript

Can someone explain why the code is passing "getFullReport" as the eventId instead of the actual value while making its way to the .Net Core 3.1 side? Prior to the call, I double-checked with a console.log to ensure that eventId holds the correct ID I am ...

Choose the option using Angular and .NET Core

I am facing an issue with my Angular controller that handles GET and POST requests for data. I had two controllers working properly, but when I added a third one by combining the previous two, the GET and POST functionalities stopped working. Can someone h ...

Tips for transferring numerous photos from Angular 8 to ASP .NET Core

I have been struggling to find a solution for the issue I am facing. When sending multiple images from Angular using "from data", although the files are successfully sent in the network request, the parameters on the API method show count=0. Here is the s ...

The server encountered an issue with starting the ANCM Out-Of-Process, resulting in HTTP Error 502

We currently have two projects in progress. One involves a Web API built on .NET Core 2.2.6 and an Angular 8 Single Page Application integrated within .NET Core 2.2.6. Both projects have been deployed on IIS 7 with the Web API functioning properly, but the ...

Angular and WEB API experiencing issues with the update function synchronization

Currently, I'm developing a CRUD example using dotnet core and Angular. In the backend, I have implemented a function in the CarController.cs as shown below: CarController.cs [Route("UpdateCar")] [HttpPut] public IActionResult Put([FromB ...

Unable to load the file or assembly 'SeleniumExtras.WaitHelpers' was unsuccessful

I am attempting to utilize wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.Id("logonIdentifier"))); However, I am encountering an error stating 'Could not load file or assembly 'SeleniumExtras.WaitHelpers'. My projec ...

Having trouble uploading SharePoint list item with attachment from Angular to ASP.NET Core Web API via NgModel

Recently, I successfully added a SharePoint list item with an attachment from Angular to ASP.NET Core Web API. This was achieved using FormControl in the Angular application. I found guidance on how to upload files from Angular to ASP.NET Core Web API at ...

Retrieving specific data in Linq with .NET Core

I'm struggling with retrieving specific fields from my model. I have a model and I only want to retrieve certain data from it. Here is the structure of my model: using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; ...

Combining the power of Vue.js and .NET Core for a powerful M

I'm currently working on developing an application using .Net Core and Vue.js. My goal is to utilize Vue.js for data loading and binding without creating a Single Page Application (SPA). In my _layout.cshtml file, I have the following: <script&g ...

Exploring ways to retrieve the parent property name within System.Text.Json.Serialization.JsonConverter

Working with a 3rd Party API that provides data in the following format: { "dynamicFields": { "prop1": "val1", "prop2": "val2", "prop3": "val3" }, // otherFields ... } ...

How can I modify my Axios Post request to receive a 201 status code in order to successfully save the data?

I am facing an issue when attempting to make a POST request locally with Axios on my NodeJS front-end app to my .NET core local server. The server returns a 204 status code and the axios request returns a pending promise. How can I change this to achieve a ...

show the UI changes using AJAX in the controller method

I need help with returning a view in an action called Ajax. The issue I am facing is that when I return JSON, it works fine, but if I try to return a view, it doesn't navigate to the view because the action was called using AJAX. Action: [Route(&q ...

Error Encountered: Kendo Angular 4 Peer Dependency Issue and Module "rxjs/operators/combineLatest" Not Found

I'm currently facing issues while attempting to integrate Kendo UI into an Angular 4 application, encountering various errors along the way. To begin, I initiated the installation by running this command: npm install --save @progress/kendo-angular-datein ...

The 'Access-Control-Allow-Origin' header can be found on the resource that was requested

I'm facing an issue while trying to connect my .net core API to an Angular application. Whenever I attempt to do so, I encounter the following error: Access to XMLHttpRequest at 'https://localhost:44378/api/recloadprime' from origin 'h ...

Is there a way to pass npm parameters to dotnet publish?

So here's the situation: I'm working with a private npm registry on a corporate network, and unfortunately I can't download from github. In order to make things work, I need to include --no-optional when running npm install which is called by dotne ...

Utilizing Date Model Binding in ASP.NET Core Framework

While working on an ASP.NET Core Web API, I encountered an issue with binding DateTime values. Specifically, I have two properties - minimumDate and maximumDate - for filtering a certain resource. These properties are part of a Filtering object that is po ...

Having trouble sending a parameter to the Controller in Visual Studio (version 2019)?

I'm facing an issue with passing parameters from a method to the Controller. Interestingly, when I manually run it with the parameter in Postman, everything works fine. Is there a way to pass the parameter to the Controller without creating individua ...

Secure your Public .Net Core WebAPI with JSON Web Tokens (JWT)

Exploring the use of JWT to secure my .net Core WebAPI endpoints for a public API. The API is intended to be exclusively accessed by a React front end that operates without user authentication. The goal is to restrict access to the WebAPI endpoints solely ...

Unleash the power of unescaping Unicode strings with System.Text.Json in dotnet

When using JsonSerializer.Serialize(obj), it produces an escaped string; however, I am in need of the unescaped version. Here is an example: using System; using System.Text.Json; public class Program { public static void Main() { var a = n ...

Master the Art of Modifying a Row in Datatable with .NET Core

I am having trouble updating a row in my datatable using .net core. The datatable display the data correctly and the new/delete buttons are working. However, when I try to edit a row, it is not functioning properly. Below is my index.cshtml code. Thank yo ...

Struggling to manipulate JSON file in C#

Having a library application allows users to register as new users, add books, borrow them, and deposit. However, encountering an issue with the JSON file raises some concerns. The problem arises when trying to manipulate the data using a foreach loop. Odd ...

Missing parameter in the AJAX request

Looking for help with calling the AddCompare action method using an Ajax request in the View. The issue I'm facing is that the parameter sent to the AddCompare Action always has a value of zero, while the parameter value in the function AddToCompare ...

The API request is experiencing delays due to the large dataset of 250,000 records

Utilizing API calls to retrieve data for the frontend is essential, but with a database table containing 250,000 rows, efficiency becomes a concern. In my .NET Core application, I implement the following query: IQueryable<Message> query = context.Me ...

Encountering a compilation error while trying to utilize Newtonsoft.Json in my Blazor application

This snippet contains the following code: @page "/" @using Newtonsoft.Json @using System.Text.Json @using System.Text.Json.Serialization <h1>Hello World</h1> @code { public class Account { public string Email { get; set; } public boo ...

Trouble with loading images using AJAX in ASP MVC core 3.0

After successfully fetching data from the API controller using an AJAX request, all the data is loaded correctly, including the image source. However, I have encountered an issue where the controller name is being appended to the image source, resulting in ...

Identifying copy and paste behavior within an HTML form using .NET CORE MVC 2.1

I inherited a project at my current company and one of the tasks involves allowing users to paste multiple ISBN numbers from Excel into a search field on my Index page (HTML). Sometimes, the ISBNs are poorly formatted with letters or special symbols mixed ...

Exploring the integration of datatables.net-vue3 with Vue.js 3 in Visual Studio: A step-by-step guide

I am trying to integrate datatables.net-vue3 with Vue.js 3 in Visual Studio. I have installed it using npm like so. However, I am facing issues with the imports in Visual Studio. I have tried importing them this way but it doesn't seem to work for me. ...

Using Partial Views in ASP Core to Make Ajax Requests

Having a requirement to divide sections of a single page into Partial Views, one of which includes a form for submitting data. After some experimentation, I have successfully implemented a form submission without the need to reload the page. Yet, I am enc ...

Creating a dynamic webpage using the MVC design pattern within a Docker container

I am facing a challenge with my dotnet core application that has authorization. Due to company policy restrictions, Bearer tokens cannot be stored on the front-end. To work around this, I want to utilize an MVC Controller. However, the application is built ...

Struggling to create an ExtentReport for your .NetCore App 2.1?

I am currently working on a project in .NetCore App 2.1 and have created some selenium scripts in C# using the NUnit framework on MacOS. The execution of these scripts has been successful, but I am facing difficulties generating a report using Extent Repor ...

How can I properly bind a list of objects with nested lists when submitting forms?

Trying to bind a complex object that consists of nested lists of objects poses a challenge. While the data binds to the page successfully with pre-populated content, issues arise when posting the form to the handler method. I can post and bind the parent ...

Utilizing ConfigurationBuilder to incorporate null values into a list using a json file

As I attempt to insert a list of enums into appsettings.json for later iteration in the code, I encounter an issue. When I include a null value in the list within the JSON file, it does not populate as a null value when loading the Settings from the file. ...

What is the best way to make DotNetCore 2.1 Web API output Json format? Is there a specific library required for this task?

Let's get straight to the point. I am currently in the process of transitioning ASP.Net web services into DotNetCore 2.1 services. My question is quite straightforward. How can I obtain JSON output from a string using a GET verb? I am new to this, but it s ...

The WebApi endpoint is not being accessed when deployed on the IIS server, even though it functions properly on the local host

Issue with Web API Endpoint not being triggered after deploying solution to IIS server Working endpoint : https://localhost:44335/Api/Course/GetStudents Endpoint not functioning correctly: Ajax Code function GetStudents(IsEdit) { $.ajax({ ...

The "data path" should not include any extra elements or properties, such as allowed CommonJS dependencies

I'm currently running Angular v10 and facing an issue when trying to start my .net core / Angular application. Despite searching for a solution and updating everything to the latest versions, the problem persists. Although there are no errors report ...

TimeoutException occurs in Browser when using Visual Studio with ASP.NET and Angular

After waiting for 60 seconds, an error message appeared in the browser when trying to debug. However, after refreshing the browser window and waiting for another 15 seconds, everything seemed to be working fine. An unexpected error occurred during the r ...

Guide on sending files and data simultaneously from Angular to .NET Core

I'm currently working on an Angular 9 application and I am trying to incorporate a file upload feature. The user needs to input title, description, and upload only one file in .zip format. Upon clicking Submit, I intend to send the form data along with the ...

Integrating a Json service into my ASP.Net Web Api results in an altered response format when viewing in Postman

Code snippet for configuring services in Program.cs without using Json service: builder.Services.AddControllers(options => { options.ReturnHttpNotAcceptable = true; }).AddXmlDataContractSerializerFormatters(); Sample Json response from Postman (Pre ...

Logging in with an External Provider using ASP Core, Identity Server 4, and Angular 2

I have successfully configured an ASP Core App with Identity Server 4 to enable token-based authentication for an Angular 2 SPA. In order to enhance the login process, I am looking to integrate External Providers such as Google and Facebook. However, I am ...

Steps to Incorporate jQuery Function in a Partial View Inside a Modal

My jquery button click method is functioning correctly in views outside of modals, but the uploadbtn button click method does not work when a partial view is loaded in the modals. <script src="~/lib/jquery/dist/jquery.min.js"></script> ...

Using a third-party Vue component within a .NET Core Razor Page, such as Vue Cal, can be easily achieved by following these steps

Greetings esteemed individuals of Stack Overflow. I am currently experimenting with the combination of .NET Core Razor Pages and the VueJS JavaScript framework. I'm interested in utilizing the Vue Cal library to showcase a calendar view on my Razor Page. ...

Leveraging ngsanitize alongside cascading style sheets

https://i.stack.imgur.com/o0rgS.png When utilizing ngsanitize, only the HTML is displayed without any applied CSS. For instance: The provided image is expected as output, but using ngsanitize results in only the text being visible. What additional steps ...

Ways to incorporate a deserialize function into an abstract class

I'm struggling with understanding how to implement my idea. I've created an abstract class AJsonSerializer where I aim to handle Serialization and Deserialization of classes. public abstract class AJsonSerializer { public string ToJson() { ...

The HTML element failed to be inserted

Currently, I am involved in a project based on .NET Core for my organization. This project entails loading work orders from our SQL database using Entity Framework and then filtering them to display as markers on a map via the Google Maps API for our insta ...

When the session times out in Angular 5, the previous user's credentials remain on the page instead of being replaced with the current user's information

When switching from one user to another in Angular 5, I am facing an issue where the previous user's credentials are displayed instead of the current user's until I refresh the page. I have tried using the localstorage.clear() method but it doesn't seem to ...