Skip to main content

All Questions

0 votes
0 answers
106 views

Http PUT method is not working in OData Web API service

I have exposed a SQL Server table using Web API and OData service in C#. In my service, the Get() method is working fine, but the PUT method is not working and I get this error System....
hellraizer's user avatar
-1 votes
3 answers
450 views

Why is my .net Core API Attribute Routing not working?

I am experimenting with a "Hosted Blazor WASM" project. This problem does not concern the Blazor client router (that is working fine). This concerns the "server-side" router not ...
Julian Dormon's user avatar
0 votes
1 answer
319 views

ASP.NET Web Site Not Allowing Axios PUT Access (405 Method Not Allowed)

I've got a controller set up and working for all of my GET requests, but when it comes to the PUT requests my Web Site (not a Web App, if that makes any difference) is returning a 405. I've got the ...
Scott Baker's user avatar
  • 10.5k
0 votes
1 answer
742 views

Web API 2 Generic route with every controller

I am working on web api 2.0 and trying to achieve below url to access with every controller. I have created a base controller which I inherited to every controller. Now I have a scenario where I need ...
Arun Singh's user avatar
0 votes
2 answers
3k views

Pass url path as param in web api endpoint

I have this controller with one method which receives two variables. One is the culture, the other is a path. public class WebsiteContentController : ApiController { [HttpGet] public ...
LucaCosta's user avatar
  • 110
0 votes
1 answer
220 views

ASP.NET Web API REST Service: HTTP ERROR 405

I have an ASP.NET Web API REST Service. It has been build using standard ASP.NET Framework 4.5 and Web API 2.2 (version 5.2.3) on Visual Studio 2013 IDE. Using Fiddler tool I am trying to check the ...
Willy's user avatar
  • 10.7k
1 vote
0 answers
97 views

C# Web Api 2.1 return 404

I've created a new C# WebApi 2.1 from MVC Empty template and I don't know why, when I create a custom route, it returns 404. Otherwise it works fine. Global.asax protected void Application_Start() { ...
Jonathan Anctil's user avatar
2 votes
1 answer
1k views

Route conflict in ASP.NET WebAPI

I have two different controllers and each one with its configured routes. To explain my problem, I will exemplify: ProdutoController [Route("v1/empresas/{idConexao}/produtos/{id}")] ...
Saulo Pacífico's user avatar
0 votes
1 answer
46 views

.Net Framework API Controller won't recognize Route attributes

I have created an API Controller using .Net Framework as follows: public class ApplicationUsersController : ApiController { [Route("api/ApplicationUser/{username}/{password}")] [...
Jim Wilcox's user avatar
  • 1,583
0 votes
1 answer
331 views

Attribute Based Routing/Versioning in ASP.Net WEB API 2.0

I'm trying to use versioning in Asp.Net Web API. Following is the structure of the project. To support versioning I've added Microsoft.AspNet.WebApi.Versioning NuGet package. Following is the code ...
Vivek Sharma's user avatar
1 vote
1 answer
386 views

ASP.NET WebApi2 OData handling of queries with slash /

I have made a "standard" Web Api 2 OData project with convention model routing. Following OData queries are working: /odata/Users /odata/Users(123) /odata/$metadata /odata/Users?$select=Username ...
dvlpr's user avatar
  • 31
3 votes
1 answer
6k views

'Page not found' error on my controller for my NET Core Web API

I am coding in C# on Visual Studio 2019, I am working on a 2019 MacBook. My app is a NET Core Web API 2.2. My controller is a API Controller with actions using Entity Framework. I ran my app before I ...
Eleven's user avatar
  • 67
1 vote
2 answers
163 views

How to implement a .NET WebAPI with a route of "controller?action&parameters"?

I'm trying to implement a specific HTTP interface (SAP Content Server HTTP Interface) with .NET Standard WebAPI, that requires that the routes be all in the form of: http://server:port/somepath/...
pap's user avatar
  • 11
2 votes
1 answer
1k views

Not able to find Web API route?

I’m struggling to figure out why I can’t get to an API end point. I’m building a Web API that will be calling another local API and from everything I see it should be getting to the end point and I’m ...
Caverman's user avatar
  • 3,789
2 votes
1 answer
650 views

How to route two get methods with same params in WebApi?

In my ApiController i had one GET method which was returning some data from DB. Now i have to enlarge that controller by adding one more GET method which will return data from same database but ...
NiceToMytyuk's user avatar
  • 4,367

15 30 50 per page
1
2 3 4 5
20