0
votes
0answers
28 views

MVC Web API POST request not working from client application but working from chrome Postman extension

I have a web API service with the controller as follows. RoutePrefix("api/Product")] public class ProductController : ApiController { [HttpPost] [POST("InsertProduct")] public ...
1
vote
1answer
75 views

ASP.NET Web Api 2 - Subdomain Attribute Routing

I've been using AttributeRouting for quite some time in my MVC application. However, one thing it always lacked is subdomain routing in Web Api (among other features in that library that work with MVC ...
2
votes
0answers
38 views

.Net Web API Routing & Help Page

I am struggling to get the API help page to show all my API endpoints, and to show them in the style I want. Here are my routes: config.Routes.MapHttpRoute("Orgs", "v1/Orgs/{orgId}", new { ...
0
votes
1answer
56 views

CORS with WebAPI sometimes works, sometimes doesn't

I've used the following: http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api As suggested here: Enabling CORS with WebAPI PUT / POST requests? to enable ...
0
votes
1answer
73 views

Enabling CORS with WebAPI PUT / POST requests?

I've tried following this post but I'm still not quite there: CORS support for PUT and DELETE with ASP.NET Web API In my web.config I have the following: <system.webServer> ...
0
votes
1answer
60 views

ASP.NET WebAPI Routing Issue

Say I have the following actions; // api/products public IEnumerable<ProductDto> GetProducts() public ProductDto GetProduct(int id) // api/products/{productId}/covers public ...
0
votes
1answer
57 views

Overload WebAPI controller action doesn't work with viewmodels?

The following works: public class UsageController : ApiController { public int GetMilk(string param1, string param2) { return -1; } public string GetBilling(string ...
0
votes
1answer
78 views

Send data from android to web api service

I have a problem in my android Background service. While send the data using http protocol it shows ClientProtocolException My WebAPI is [AcceptVerbs("GET", "POST")] ...
0
votes
1answer
27 views

Documet webAPI in webpage of API

I have a webAPI in which I have many functions. I would like to create a page that will describe the api when a user goes to the api link. Example: I have the link: ...
0
votes
2answers
53 views

Correct web-api controller action method definition for jsonp request

I have a simple web api controller action method: public class WeightController : ApiController { [HttpGet] [AcceptVerbs("GET")] public int GetWeight(int weightId) { return 5; ...
1
vote
1answer
76 views

Can I route a mix of optional and conditionally mandatory parameters in ASP.NET Web Api/MVC

I'm guessing that the answer is to make multiple routes, but our route list is beginning to get long, so I'm looking to see if this can be expressed more elegantly and simply. :) In my current ...
0
votes
1answer
133 views

.Net WebApi OData Actions that return an Queryable

I want to achieve something close to the RateProduct action described in: http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/odata-actions In that tutorial it is defined as: ...
0
votes
1answer
101 views

AttributeRouting - how to specify route with query-string

I'm trying to add AttributeRouting to my WebAPI project. On one controller I currently have three GET methods defined: [GET("dictionaries")] public IEnumerable<Dictionary> Get() ...
3
votes
3answers
93 views

How can I call different GET Methods in the same Controller utilizing different parameters?

I have a Controller that contains two different Get methods. One takes an int value, while the other takes a String value, like below: public class AccountController : ApiController { public ...
0
votes
1answer
140 views

Exception while passing JSON string(multiple parameters) to method in WebAPI service

While trying to pass a JSON data from script side to the method inside WebAPI service we are getting the following exception. { "Message":"No HTTP resource was found that matches the request URI ...

1 2 3 4 5 6
15 30 50 per page