Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
22k views

Just like my original question states. I was wondering in there is a was in vb.net to consume an asp.net web api. I'm a beginner asp.net programmer. I'm watching videos on how to make the web api. ...
14 votes
1 answer
9k views

I am trying to optimize bandwidth usage by compressing requests from my angular client to a AspNet Web API. Is there any way to achieve this?
Advice
0 votes
2 replies
41 views

I have this scenario: I have an ASP.NET API which is deployed on IIS under the default web site. I have added the API by right click on default web site -> add application. API is working fine and ...
123 votes
5 answers
231k views

I created an mvc4 web api project using vS2012. I used this tutorial to solve the Cross-Origin Resource Sharing. It is working successfully, and i post data from client side to server successfully. ...
2 votes
2 answers
3k views

I have a web api with many controllers. With those controllers i defined a lot of roles and decorated the controller/functions. To access the api i use jwt. I tried to write my roles into the jwt ...
103 votes
25 answers
171k views

I'm using Swashbuckle to generate swagger documentation\UI for a webapi2 project. Our models are shared with some legacy interfaces so there are a couple of properties I want to ignore on the models. ...
1 vote
4 answers
9k views

I'm trying to create a daemon using Microsoft Graph API v1.0. I've registered my app with application permission Calendars.ReadWrite and User.Read.All with granted admin consent. I get the access ...
19 votes
3 answers
33k views

I have a few web services running on different servers, and I want to have one web service running "in front" of the rest to decide which web service (server) the request should be forwarded to based ...
18 votes
5 answers
12k views

Im using Spotify Web API to get list of playlist and track of user. Authorization is working fine. Also i do get track details. But after that I want to logout user from spotify and allow new login . ...
4 votes
1 answer
3k views

I am busy design a web service with asp.net web api. And I want to start doing unit tests on each controller. here is my test class so far: [TestClass] public class MyDevicesControllerTest { [...
0 votes
3 answers
9k views

Hej, I am unable to post data to the action method through querystring to the action method which is located in the controller class below is my code. I type a url "http://localhost:53459/api/esb/...
5 votes
1 answer
9k views

I wrote REST service using ASP.NET Web API I’ve also set “copy local” property of the below libraries to true. System.Web.Mvc System.Web.Routing System.Web.Abstractions I deployed it using visual ...
1 vote
2 answers
1k views

I am using ASP.net Core 3.1 and trying to make appsettings.json inaccessible on the browser i.e. when I am typing https://myapp/appsettings.json, it's showing the contents of appsettings. I want to ...
15 votes
6 answers
62k views

We have the pdf document save in data base , from webapi I am returning as byte array,Now from UI I have to open the pdf in new tab of browser, and user should able to download the pdf. How can I ...
3 votes
1 answer
10k views

I have simple console application, which send json data to controller. Client.PostAsJsonAsync("http://[site].azurewebsites.net/api/Decision", report); And controller: public class DecisionController ...
195 votes
5 answers
228k views

I have a method that does a POST like below var response = await client.PostAsJsonAsync(url, entity); if (response.IsSuccessStatusCode) { // read the response as strongly typed object ...
306 votes
11 answers
203k views

From previous versions of the question, there is this: Browse website with ip address rather than localhost, which outlines pretty much what I've done so far...I've got the local IP working. Then I ...
75 votes
24 answers
170k views

I'm trying to get an API Controller to work inside an ASP.NET MVC 4 web app. However, every request results in a 404 and I'm stumped. :/ I have the standard API controller route from the project ...
1 vote
2 answers
12k views

I've got a .NET Web API project using Windows Authentication. In my development environment, I can't do a successful POST request with data from my Angular app. It returns: OPTIONS http://localhost:...
23 votes
2 answers
9k views

there are 100s of question on CORS on web-api, and on how to enable CORS, there is a different answer each one provides. I am so confused and don't know which answer is correct. And the problem is ...
0 votes
1 answer
15k views

I am using a Web Api with the following data in a controller. public IEnumerable<string> Get() { return new string[] { "Item1", "Item2s", "Item3", "Item4", "Item5" }; ...
9 votes
2 answers
7k views

I use HttpLogging to log requests coming to my endpoints. I would like to log the whole request. I setup the HttpLogging in Program.cs builder.Services.AddHttpLogging(logging => { logging....
0 votes
0 answers
71 views

I'm using data annotations from System.ComponentModel.DataAnnotations in my ASP.NET project. I get an error message where you can describe the requirements such as "Name is required" and etc....
4 votes
1 answer
9k views

I am working on New web application which is Using Web API as Business Layer and Knock out Js as client side frame work to binding. I have a requirement like Pass the certain search criteria to Web ...
101 votes
34 answers
275k views

I have a Web Api application. It works perfectly well when I tested it using the VS 2010 debugging dev server. But I now deployed it to IIS 7.5 and I am getting a HTTP 404 error when trying to access ...

1
2 3 4 5
759