Questions tagged [asp.net-core-webapi]

Inquiries regarding ASP.NET Core web APIs and web applications that do not rely on MVC Views or Razor Pages.

Excessive string length within a JSON array results in a 400 Bad Request error on a .NET Core Web API

Within my JavaScript application, I am utilizing the fetch API to send an array that contains a lengthy string to a .NET Core Web API. The structure of this data looks like: "FirstName LastName (Country) TEXT INFORMATION: ^MOM?ROVAL LETTER REQUI ...

Error Message: Unable to access 'map' property of undefined in TSX file

Component for displaying attendees in an activity interface IProps { attendees: IAttendee[] } export const ActivityListItemAttendees: React.FC<IProps> = ({attendees}) => { return ( <List horizontal> {attendees.ma ...

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 ...

What is the best way to utilize multiple models under a single root in ReactJS?

Greetings! I currently have a root structure in the following code snippet: <body> <noscript>You need to enable JavaScript to run this app.</noscript> <button >Platform</button> <button >Game</button> < ...

Current CORS complications persisting with Vue 3, Axios, and ASP.NET Core Web API backend interaction

I am puzzled. While running my .net core server and loading the vue project in the same file, I encounter partial success. However, when I start testing the axios/fetch requests, the test project fails in other ways. My CORS policy is set to be very lenie ...

Troubleshooting CORS problem: Angular 2 and AspNetCore WebApi encounter error with preflight response having invalid HTTP status code 401

Hello there! I am currently working on implementing a straightforward token based authentication method in an Angular 2 RC6 application against an AspNetCore WebApi project that I developed using Visual Studio 2015. If you're interested, I have uploa ...

Exploring the depths of Next.js and ASP.NET Core Web API with the challenge of DEPTH_ZERO_SELF_SIGNED_CERT

My current setup involves utilizing Asp.net Core Web API as the backend and Next.js as the frontend. The API is running on localhost with a self-signed SSL, making it accessible through https. On the other hand, Next.js runs on localhost without SSL, only ...

What are the steps to utilize kendo-fileselect in order to upload files from an Angular application to a C# web API?

We are integrating Kendo for Angular into our current project. In our existing system, we utilize kendo-upload which triggers a server call immediately. However, we cannot follow the same approach for this particular page. https://i.stack.imgur.com/qdn2b. ...

Tips for displaying real-time data and potentially selecting alternative options from the dropdown menu

Is there a way to display the currently selected option from a dropdown list, and then have the rest of the options appear when the list is expanded? Currently, my dropdown list only shows the available elements that I can choose from. HTML: < ...

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({ ...

Contrast between utilizing form data versus base64 encoding for transmitting images to a .NET API

Currently tackling an angular 2 project where I need to transmit images along with data to a .NET Core API. How can this be accomplished effectively? Utilizing a cropper that produces base64 output. In previous requests, sending a single image as for ...

Unable to access the API within Angular using a web browser

My Angular application is hosted within an ASP.NET Core application on IIS. The API controller of the ASP.NET Core application can be accessed using the HTTP client in Angular as well as in a C# console application. However, I am facing an issue where I c ...

Extracting specific attributes from one array in Vue.js to populate another array

I've been trying to transfer some attributes from the Zamestnanci array to the archivovany array, but nothing seems to be working. Every time I attempt, I either get an HTTP error 415 or 400 because the attributes in archivovany are null. <script> ...

Encountered an issue when attempting to post to an ASP.NET Core Web API utilizing Windows authentication

The setup consists of an AspNetCore WebApi using default configuration for Windows authentication and CORS enabled. The client side utilizes Angular with both GET and POST methods implemented. Successfully executing the GET call: this.http.get("https://l ...

Issue with file upload controller in .net core 2.2 and Angular 7: IFormFile always returns null

Despite thorough research and checking other answers, my controller is not receiving any data. Correct API URIs are used and the request does reach the appropriate controller. Unique Angular Snippet: In the component.html file - input field setup <d ...

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 ...

Why won't my Angular app hit a breakpoint while debugging?

I'm relatively new to the world of Visual Studio Code and Angular applications with a C# Web API back-end. My issue lies in hitting breakpoints within my Angular app using VS Code, even though I can hit them without any problems in C#! Running both a ...

Managing authentication during an ajax call from an MVC client to the resource API within Identity Server 4

Authentication in my system is handled by Identity Server 4. One of the client's applications is an Asp.net core MVC Project, which needs to make ajax requests to a web API resource. From certain pages on the MVC client, I need to call the web API re ...