Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
47 views

My question is how do I need to validate fields. I have this class (request dto): public class CompleteGoogleRegistrationRequest { public string IdToken { get; set; } = string.Empty; public ...
Dmytro Zhadan's user avatar
1218 votes
29 answers
994k views

Using the newer ASP.NET Web API, in Chrome I am seeing XML - how can I change it to request JSON so I can view it in the browser? I do believe it is just part of the request headers, am I correct in ...
naspinski's user avatar
  • 34.8k
0 votes
3 answers
141 views

Say I have this interface: public interface IExample { string GetSupportedExtension(); void DoWork(Stream input); } a concrete implementation like: public class PdfExample : IExample { ...
Kiblinix's user avatar
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....
DELI's user avatar
  • 11
271 votes
23 answers
416k views

I'm working on a ASP.Net Core 2.0 project using Entity Framework Core <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" /> <PackageReference ...
André Luiz's user avatar
  • 7,422
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 ...
Chris's user avatar
  • 31.7k
0 votes
1 answer
108 views

fetch('https://localhost:7077/api/test/users') .then(res => res.json()) .then(data => console.log('Users:', data)) .catch(err => console.error('Error:', err)); Error: Promise {<...
Brandon's user avatar
208 votes
34 answers
364k views

It's a WebApi project using VS2015. Step to reproduce: Create an empty WebApi project Change Build output path from "bin\" to "bin\Debug\" Run Everything is working perfectly until I changed Build ...
cscmh99's user avatar
  • 2,821
470 votes
15 answers
778k views

I have concerns on the way that we returns errors to client. Do we return error immediately by throwing HttpResponseException when we get an error: public void Post(Customer customer) { if (...
cuongle's user avatar
  • 75.5k
682 votes
18 answers
530k views

I recently found a movie organizer application which fetches its data from the IMDB database. Does IMDB provide an API for this, or any third party APIs available?
tusay's user avatar
  • 7,037
278 votes
20 answers
478k views

I have a simple webAPI build by Visual Studio 2013. It works well when I run it from VS13 but when I copy the project in local IIS it gives me the following error. HTTP Error 500.19 - Internal Server ...
Umar Abbas's user avatar
  • 4,161
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. ...
mutex's user avatar
  • 7,746
360 votes
7 answers
443k views

I'm trying to support JWT bearer token (JSON Web Token) in my web API application and I'm getting lost. I see support for .NET Core and for OWIN applications. I'm currently hosting my application in ...
Amir Popovich's user avatar
688 votes
4 answers
292k views

When you have server-side code (i.e. some ApiController) and your functions are asynchronous - so they return Task<SomeObject> - is it considered best practice that any time you await functions ...
Aen's user avatar
  • 7,638
1 vote
1 answer
93 views

I'm writing integration tests in my .NET Web API. I'm using XUnit for this. I am using factory and collection. And everything works as expected. I run factory there I have used PostgreSql database ...
pietro's user avatar
  • 221
410 votes
9 answers
325k views

I've been playing around with ASP.NET MVC 4 beta and I see two types of controllers now: ApiController and Controller. I'm little confused at what situations I can choose a particular controller. ...
VJAI's user avatar
  • 32.9k
345 votes
7 answers
349k views

I am trying to use the web api's HttpClient to do a post to an endpoint that requires login in the form of an HTTP cookie that identifies an account (this is only something that is #ifdef'ed out of ...
George Mauer's user avatar
205 votes
28 answers
437k views

I did the upgrade according to. http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2 I get the error. Does any one else got this ...
Michal Asaf Carmeli's user avatar
275 votes
18 answers
244k views

I keep getting this error when I try to have 2 "Get" methods Multiple actions were found that match the request: webapi I been looking around at the other similar questions about this on stack but ...
chobo2's user avatar
  • 86.2k
372 votes
9 answers
259k views

I see in tons of examples on the web using the new HttpClient object (as part of the new Web API) that there should be HttpContent.ReadAsAsync<T> method. However, MSDN doesn't mention this ...
David Pfeffer's user avatar
1 vote
1 answer
106 views

I'm building a .NET 8 Web API that connects to MetaTrader 5 using the MT5 Manager API. Everything works perfectly when running locally from Visual Studio. However, after publishing and deploying the ...
Ashna Lukman's user avatar
185 votes
16 answers
389k views

I am using ASP.NET Web API: http://xyzdomain.com:16845/api/returns/returns How do I send a POST request to the endpoint using Postman Chrome extension, given Items is a collection: [ { "Items":...
user3965303's user avatar
  • 1,851
0 votes
0 answers
70 views

I have a basic ASP.NET Web API project. When I send a request, the serialization is done using System.Text.Json. However, when I send a non-valid json, for example text instead of number, it returns a ...
pietro's user avatar
  • 221
200 votes
14 answers
436k views

I have been using HttpClient for making WebApi calls using C#. Seems neat & fast way compared to WebClient. However I am stuck up while making Https calls. How can I make below code to make Https ...
Abhijeet's user avatar
  • 14.1k
214 votes
9 answers
293k views

I am developing an API to expose some data using ASP.NET Web API. In one of the API, the client wants us to expose the date in yyyy-MM-dd format. I don't want to change the global settings (e.g. ...
Stay Foolish's user avatar
  • 3,776

1
2 3 4 5
759