Questions tagged [webapi]

Questions related to web browser's Web APIs specification. Web APIs is a set of numerous different APIs related to programmatically using web browser with your JavaScript code. For example the visual web page rendered is represented as and controlled by Document Object Model (DOM), which itself is a Web API. Or when using console.debug() function to log messages to the browser's console, you are using Console API.

Questions related to web browser's Web APIs specification.

Web APIs is a set of numerous different APIs related to programmatically controlling the functions of a web page that is run in the web browser with JavaScript code.

For example the visual web page rendered is represented as and controlled by Document Object Model (DOM), which itself is a Web API. Or when using console.debug() function to log messages to the browser's console, you are using Console API.

If you are new to Web APIs, you can read: Introduction to web APIs

1984 questions
0
votes
0 answers

Multiple Authorization

I have ASP.NET web API and I wanted to apply multiple authorization schemes to one controller method. For my use case, I wanted to allow Data() access to all users with /api/AData url but only b_data_user can access /api/BData. I tried below code…
user781700
  • 844
  • 3
  • 15
  • 27
0
votes
0 answers

How to add react.js with typescript in existing Asp.NetCore Webapi project in visual studio

I created a project with Asp.NetCore3.1 and Web API in visual studio 2019 and now I want to add React and TypeScript in there and i don't know how to do that. I found a few things but they didn't help me. I can do that with VSCcode and I dont have…
fatemeh
  • 1
  • 2
0
votes
1 answer

How to add load data in to checkedboxlist using web api C# winforms

data not loading in checkedboxlist in winforms when using web api C# . Error : cannot convert string to system.Sqlclient.sqldata.sqlcommand **what i have tried.** string ComId = Login.usercomid; string UName =…
0
votes
2 answers

How to pass multiple model as parameter in WEB API

Can anyone please help me to pass multiple models as a parameter to the request's content in WEB API? I have 2 different Model Student and Employee public class Student { public int StudentId { get; set; } public string…
0
votes
1 answer

How to save a json file in azure webapp to use as environment

I'm using the Google Credentials locally and I refer it by selecting the actual json file path "GOOGLE_APPLICATION_CREDENTIALS" with WebApi, I couldn't find nothing to save the file so I just copied the whole information and put as a string inside…
Nathiel Paulino
  • 534
  • 6
  • 17
0
votes
1 answer

.Net Core Web API Handling exception in different layers

I'm working on a .Net Core 3.1 Web API with different classic layers (DDD). We've implmented a global exception handler to catch all the exceptions and send back friendly messages to client. In my team, we've got different points of view on…
wfe
  • 9
  • 6
0
votes
0 answers

Issues with JSON Derived classes - receiving an error

We are having an issue getting JSON to serialize and deserialize derived classes properly. We have attempted to apply settings to a JsonConvert method, but that doesn't seem to be working. The classes serialize and deserialize in XML just fine. This…
Greg
  • 85
  • 1
  • 8
0
votes
1 answer

WebApi: how to make async methods run first, before going on

I'm trying to manipulate data on a webpage and I have an API that can do that, but I ran into some problems. There is a part in my code, where I insert-, manipulate and then update data to the webpage. The API uses asynchronous methods to insert and…
0
votes
1 answer

WebApi server only accesses IdentityServer once after it starts

Good day. I request an access token with IdentityServer I am accessing my API after starting the webapi server. After that, using the current access token, I can access my api, even if the IdentityServer is turned off. My question: Is this the…
0
votes
1 answer

SignalR specify an url for external react client server in Web API .NET Framework

I'm using Web API .NET Framework Web API and React.js on a different client server. I searched on the internet how can I link my client server with my SignalR from the API but I could not find anything that will work for me. Here's what I've done in…
0
votes
2 answers

UseOpenIdConnectAuthentication middleware not working when self hosted

I have a WebAPI that was hosted on IIS and I am attempting to move it into Service Fabric. Everything is working, except for my OpenIdConnect middleware. The redirect to the auth provider never happens. I have it setup to only redirect the user when…
Josh
  • 1,648
  • 8
  • 27
  • 58
0
votes
1 answer

SQL function SYSDATETIME() can return duplicated values?

I have a webApi which registers orders, using a stored procedure, assigning the creation date = SYSDATETIME(). Every request registers one unique order. The problem is than two different requests to my Api, in the same second, separated less than…
Juanma R.
  • 281
  • 1
  • 3
  • 7
0
votes
0 answers

Asp.net web Api with ODATA returns 406 Not Acceptable

I am trying to implement a web API endpoint that returns ODATA. But when I am trying to hit the endpoint the code in the method was executing successfully but getting 406 Not Acceptable error. Below is my code. Controller: using…
0
votes
0 answers

CRM WEB API Batch

I am fairly new to CRM Web API and coding in general but I did want to try my hand at this regardless. I was trying to implement a custom "convert Contract to Invoice" functionality by first creating an Invoice with the data from a contract and…
uWuW
  • 1
  • 1
0
votes
0 answers

C# WebAPI Thread Aborting when Sharing Data Access Logic

I'm getting the following error on my C# Web API: "Exception thrown: 'System.Threading.ThreadAbortException' in System.Data.dll Thread was being aborted". I have a long running process on one thread using my data access logic class to get and…