0
votes
1answer
40 views

WebAPI can't call Put method

I have the following code on server: public class UploadController : ApiController { public void Put(string filename, string description) { ... } public void Put() { ...
0
votes
1answer
72 views

How do I POST a httpclient to a WEB API? (simple as possible way for my highscore table)

My windows phone client sends a piece of JSON that represents the Name and Score... Should I be using the Class from the Web API instead ? What is the code to send the object to the server rather than ...
0
votes
1answer
71 views

HTTP requests and Cookies (HTTP Client) - How do I manipulate them in a desktop app?

I have just started to learn C# and Asp.Net and I have a specific project in mind but I need to be able to manipulate cookies client side and I can't find good documentation for this so I decided to ...
0
votes
0answers
87 views

How can i call a sync method to my webapi?

When i'm using the HttpClient.GetAsync method, i've made an async call. The problem is my web api which make some validations, but if i shot a lot of calls at same time, the validation fails. When the ...
0
votes
2answers
122 views

Status Code 500 when tetsing HttpClient in ASP.NET Web Api

I am trying to work through an example using HttpClient from the ASP.NET Web Api but I am receiving a status code 500 in the response and I don't know why. I have the following code in a test: ...
0
votes
2answers
462 views

PostAsync HttpClient error with Web Api - System.AggregateException “A task was canceled.”

I'm trying to call PostAsync method using System.Net.Http.HttpClient from the Web API. I get the following error: System.AggregateException "A task was canceled." Task: Id = 1, Status = ...
0
votes
1answer
362 views

Asp.net Web Api Redirect request

I have an Asp.net Web API project which has several CRUD methods. On top of these methods, i want to add an Authorization service that reads the Authorization header and prevent users of accessing ...
0
votes
0answers
367 views

HTTPClient Do not PostAsJsonAsync DateTime type

I have a User Class that i want send this object from WPF that use HTTPClient to database with WebApi. all of things work well but without any DateTime fields. when i add Created field that is ...
1
vote
1answer
300 views

“Internal Server Error” while serializing JSON in Web API Post method

I have a server which communicates with client using ASP.NET Web API. My model in server side is more detailed and client has less data so I use [DataContract]/[DataMember] to match the both. Here ...
-4
votes
1answer
45 views

HttpClient what and for what?

What is HttpClient? For what it is? and how write simple http client for api controllers to get access to them?
1
vote
2answers
409 views

HttpRequest.Files is empty when posting file through HttpClient

Server-side: public HttpResponseMessage Post([FromUri]string machineName) { HttpResponseMessage result = null; var httpRequest = HttpContext.Current.Request; if ...
2
votes
1answer
2k views

MVC 4 Web Api Post

I want to make an insertion from a distant client for that I need to send data via http. I can use the getPerformances() correctly with an httpClient api/performances?date={0} I want to ask if my ...
0
votes
2answers
343 views

How to call a Post api with multiple parameters

How can i call a Post method with multiple parameters using HttpClient? I am using the following code with a single parameter: var paymentServicePostClient = new HttpClient(); ...
0
votes
1answer
285 views

How to post from Windows Phone 8 to Asp.Net MVC4 WebApi and get JSON back

I have the following Asp.net MVC4 WebApi method def.: public ApiResponse Process(string id, FormDataCollection form)... that I use to post form data from ExtJS and return a custom class ApiResponse ...
2
votes
0answers
107 views

GetAsync from unknown IPAddress cause application to crash

Appliction: A WPF Application using HttpClient to asynchronously get data from a Web API(eg.: "http://<ServerIP>/api/GetData") Getting data interval: 3s; Sample Code: //initialize ...

1 2
15 30 50 per page