Skip to main content

All Questions

Tagged with
0 votes
1 answer
285 views

REST Server connection reset on Routing path

Question is: Did I define the client resource call correctly, or is there something wrong in the server code? I have a REST API server I am coding in C# / Visual Studio 2019 using the Web API template....
Jay Imerman's user avatar
  • 4,640
4 votes
1 answer
1k views

ASP.NET Core RESTful, same routes but different actions

I try to have multiple routes with equal URLs like files/{fileId} but different return values. I would like to distinguish the routes based on the MIME type. In one case I want the file details in ...
Yannick Sutter's user avatar
0 votes
1 answer
293 views

The web api doesn't route

I try to build a simple API but routing seems doesn't work such as not the page found on the web browser. For example, when I type https://localhost:5001/xyz no page is found. However, https://...
Soner from The Ottoman Empire's user avatar
0 votes
0 answers
162 views

Cannot get ASP.NET Web API routing to work at all

I am trying to refactor an old setup, the end goal will be that I will have a functional REST API. I am getting rid of an old NuGet service and I sort of have to rebuild everything now. I am trying to ...
GitGotGood's user avatar
1 vote
1 answer
274 views

How to overwrite API Route names?

I have my Route name in the controller as below: [Route("api/v1/[controller]/[action]")] [ApiController] Is it possible to change in the config level to overwrite the above Route?
Vara Prasad.M's user avatar
0 votes
0 answers
112 views

My WebAPI route keeps returning a 404 error when containing a period

I have been having issues setting up my custom WebApi route in C#. I am setting up a custom route that uses a company name a parameter. The route works fine, unless the company name ends with a "." I ...
Ted's user avatar
  • 1
0 votes
1 answer
256 views

ASP.NET Web Api Routing not working in C#

I have a GET-endpoint called GetPostalCodeXml but it doesn't seem to ever get routed correctly The method is in a class called WebServiceController like so: public class WebServiceController : ...
Totte's user avatar
  • 11
1 vote
1 answer
60 views

How is the correct format for a PUT querystring?

I need to build a PUT method which will receive a insurance policy number and a star date of the relevant period. This method will update the start relevant period, so since there's an update, the ...
Valmir Cinquini's user avatar
2 votes
2 answers
62 views

MVC APIController With CustomNames

So im new to netcoreapp and im trying to convert my old rest api to the new one. The problem is that im having trouble to use custom methods name and parameters. I only want to have [HttpGet] or [...
Alen.Toma's user avatar
  • 4,870
0 votes
1 answer
69 views

How to route to a controller when controller is not recognized in first place in asp.net mvc?

I'm trying to create a API broker program so that a frontend can call a api with any endpoint given, in the broker I decide which URL to be executed. I have the following problem: In my front-end I ...
NielsStenden's user avatar
1 vote
2 answers
1k views

API route versioning with same route name on diff controllers C#

I am getting the error - Multiple controller types were found that match the URL. On my mobile API, I have to support multiple versions.. All are mixed into a single controller with overriding route ...
DHAR's user avatar
  • 73
0 votes
1 answer
1k views

.NET Core: Order of optional parameters in GET request

I have a .NET Core REST api, and I am requested to handle a GET request where the route template of optional parameter should be like …/parameterName/parameterValue/.... What I've tried so far is ...
Ayoub.A's user avatar
  • 2,113
-1 votes
3 answers
1k views

Routing and multiple parameters in a web api controller

I know this has been asked a lot of times but nobody really wraps it up. I'm currently using a .NET Core Backend which has a web api controller. I know that there are multiple ways of handling the ...
Ekos's user avatar
  • 725
0 votes
0 answers
229 views

Match a url to a route in ASP.NET

I am developing a REST API using ASP.NET and i need to accept a parameter in the body of a random POST request in the API that represents another API resource. As for an example, Suppose we have: ...
Anis Tissaoui's user avatar
0 votes
2 answers
1k views

Commonly used Web API parameters - route vs header?

I'm looking for best way of passing a common parameter between pretty much all of my web API methods. The parameter in this case is a repository identifier as there is a choice on login into the SPA ...
ajbrun's user avatar
  • 333

15 30 50 per page