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

Question Why does dotnet run in my ASP.NET Core Web API use http only, and not using https, as well? Details I am working on Exercise - Create a minimal API from the ASP.NET team. According to item 3 ...
nam's user avatar
  • 24.3k
0 votes
1 answer
3k views

I am working on a .NET framework 4.8 Web API project and I'm trying to enable versioning on the REST API endpoints. All the endpoints are broken and I am unable to figure out what is wrong. Can anyone ...
user1258028's user avatar
1 vote
0 answers
169 views

After upgrading the OWIN libraries from version 3.0.1 to 4.2.0, the Http RequestUri is now coming in capital letters. This means that if I am requesting from the front end like http://localhost/...
Anil Kumar Maurya's user avatar
0 votes
1 answer
47 views

I am new to odata and trying to follow the tutorial https://learn.microsoft.com/en-us/odata/webapi-8/fundamentals/routing-overview?tabs=net60 I am trying to create an action reachable on http://...
Aastha's user avatar
  • 43
0 votes
2 answers
181 views

We have a microservice architecture with each microservice currently being hosted in its own process, and deployed via its own docker image. Totally school book separated. On a source level, all ...
someName's user avatar
  • 1,273
0 votes
1 answer
70 views

Documenting a much random issue, probably of .NetFramework, that happens once every 3-4 weeks. We have 3 load-balanced servers in AWS behind ALB. And occassionally, one of the WebAPI servers stops ...
Anshuman Chatterjee's user avatar
0 votes
0 answers
112 views

Basically, I am trying to make a dynamic SQL controller for Web API. I am having an issue trying to just type the normal URL path of the Web API and using the insert columns to see if I will get the ...
user avatar
0 votes
1 answer
164 views

In the Person class, Birthday is defined as DateTime. public class Person { public string Name { get; set; } public DateTime Birthday { get; set; } } In my controller, I have an endpoint as ...
FunkMonkey33's user avatar
  • 2,266
0 votes
1 answer
233 views

I am trying to call controller action in subfolder located in main Controller folder. I changed RoutePrefix in controller and app.MapControllerRoute() in program.cs different ways. But my postman call ...
NeoDotNet's user avatar
1 vote
2 answers
1k views

I am retrieving a string from my appsettings.json: { "ConnectionStrings": { //several strings }, "BaseRoute": { "Base": "/myapi/" } } And I ...
Pieter Dreissen's user avatar
0 votes
1 answer
224 views

I have the following code which was working fine in .Net Framework but after upgrade it's throwing 404 error. This is basically my code : [RoutePrefix("API")] [BasicAuthenticationFilter] ...
TheFallenOne's user avatar
  • 1,716
0 votes
0 answers
1k views

I am currently working on an ASP.NET Core 7 Web API project and I am facing an issue with defining the API route using API versioning. Program.cs builder.Services.AddSwaggerGen(c => { ...
Rakesh Kumar's user avatar
  • 3,229
0 votes
1 answer
205 views

almighty All! Second day passed... Need Help! I have two controllers: base DocumentController and derived InvoiceController in ASP.NET C# WebAPI application**:** [ApiController] [Route("Documents&...
Sergey  Khachaturov's user avatar
-1 votes
3 answers
482 views

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
3k views

I want to create two routes, one with version and another without, to point to the same controller without decorating the controller methods. I have defined two routes at the top of the controller, ...
RedRose's user avatar
  • 729
0 votes
0 answers
97 views

My original problem is that my GET request was being rejected for the parameters being too long. So I thought, oh I'll just POST the parameter that's getting too long. Well that doesn't work because ...
Andrew's user avatar
  • 1,655
1 vote
1 answer
114 views

First time working with web APIs and I can't seem to make the PUT method work, while everything works fine (get, post and delete). I'm trying to do, what I think it is, a very simple call to update ...
Lucas Hoffmann's user avatar
0 votes
1 answer
81 views

Working on getting a skeleton of ASP.Net application running on Ubuntu. Installed all the requisite applications. Just trying to serve index.html or index.aspx to start. However, running through Nginx ...
LiteWait's user avatar
  • 634
3 votes
1 answer
2k views

I am trying to achieve header based versioning on my controllers with Asp.Versioning.Http package version 6.4.0 it is supposed to be super simple here however i get AmbiguousMatchException: The ...
TheSlowestDev's user avatar
1 vote
1 answer
1k views

I have build an ASP.NET Core Web API and it's working fine on my machine testing it with postmann, all is beautiful, but when I put it in production on my plesk web server, it always says error 404 ...
sauro1997's user avatar
0 votes
1 answer
787 views

I'm working on converting an ASP.NET Web API 2 to a .Net 6 Web API and ran into a problem when using Versioning. The problem I'm running into concerns named routes. I want my API to be able to be ...
RoLYroLLs's user avatar
  • 3,225
0 votes
1 answer
5k views

I have a url (that I can't really modify) that has id as part of the route and then a start date and end date as query parameters. I'm not sure how to mix route parameters and query parameters and ...
Bryan Dellinger's user avatar
10 votes
1 answer
4k views

In .NET 5 this was working, but since moving to .NET 6 and using the more minimal WebApplication to spin up a REST API, I've hit a wall. To replicate this, I create a simple .NET 6 Console App and in ...
jtalarico's user avatar
  • 1,116
0 votes
0 answers
38 views

On my WebAPI .Net Framework 4.8 I have a WebAPI method with this route : [Route("gdoc/a/G1/{code}/{path}/child")] This route doesn't fully work because {path} value contains caracters "...
papoxe's user avatar
  • 53
0 votes
1 answer
1k views

I have been trying to figure out how to use multiple [Route("[Controller]")] attributes in my two controller files. From what I have looked it up it seems possible, and even MS docs say you ...
JustBarnt's user avatar
  • 134
2 votes
1 answer
1k views

I can't seem to reach an endpoint using the POST method but the very same endpoint works fine when using the endpoint as a GET method. I have mentioned two endpoints below, one of which is a GET ...
Luky's user avatar
  • 21
1 vote
2 answers
1k views

I have built a controller. For some unknown reason the end point is not reached. Unfortunately I do not understand why. [Route("api/realestates")] [ApiController] public class ...
Taladan's user avatar
  • 499
0 votes
0 answers
2k views

I have this controller/action: using Microsoft.AspNetCore.Mvc; namespace WebService.Controllers { [Route("api/[controller]")] [ApiController] public class PageController : ...
noontz's user avatar
  • 2,097
0 votes
1 answer
518 views

I have ApiController that looks like [RoutePrefix("Companies")] public class CompanyController : ApiController { [HttpGet] [Route("GetCompanyProfile")] public ...
Anders Lindén's user avatar
0 votes
0 answers
1k views

In my ASP.NET web application I have two types of controllers: 1) Web API controllers: 'System.Web.Http.ApiController' 2) Odata controllers: 'Microsoft.AspNet.OData.ODataController' I have a problem ...
lukas1987's user avatar
-1 votes
1 answer
2k views

I am working on a project which have scenario to redirect to httppost method from another controller which have a httpget method. Can you guys suggest me a good approach to achieve it? Example is ...
Arun Singh's user avatar
2 votes
3 answers
4k views

Just realised that my understanding about ASP.NET Core 6 Web API versioning is wrong. This is my controller: [ApiVersion("1.0")] [ApiController] [Authorize] public class FundController { ...
daxu's user avatar
  • 4,212
1 vote
0 answers
158 views

I have a simple WebAPI controller, looks like this: [Authorize] [ApiController] [Route("v{version:apiVersion}/[controller]")] [Route("[controller]")] [ApiVersion("1.0")] [...
user1470240's user avatar
9 votes
4 answers
5k views

I have a WebAPI controller named WeatherForecast with one operation. The operation method looks like follow: [HttpGet(Name = "GetWeatherForecast")] public IEnumerable<WeatherForecast> ...
user1470240's user avatar
2 votes
1 answer
721 views

How can I map multiple urls to one action method? For example http://localhost:10000/api/ABC and http://localhost:10000/api/ABCDCD will map to same action name because both starts with ABC. I can't ...
user781700's user avatar
3 votes
1 answer
4k views

I'm trying to create a standard WebAPI project in .NET 6. I notice that the standard ApiController route doesn't have the leading api route that I like to have. When I add it, the controller breaks. ...
Daniel Przybylski's user avatar
0 votes
1 answer
1k views

I'm working on a Blazor WASM project, and I have a page that needs to post a file to the server. So I wrote something like this: @page "/Test" @inject HttpClient httpClient <h4>Please ...
Brian's user avatar
  • 147
0 votes
0 answers
190 views

Under an 'apps' web site, we've created a web application through docker/powershell using: New-WebApplication -Name 'service_b' -Site 'apps' -PhysicalPath 'C:\ServiceB.API' -ApplicationPool '...
Triynko's user avatar
  • 19.3k
0 votes
0 answers
70 views

I have a web api controller with HttpGet method inside. The controller sets it's route in a parametrized RouteAttribute (catalogId doesn't have :int or :long rules by an intention). The controller's ...
Dmitriy's user avatar
  • 674
0 votes
1 answer
331 views

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
769 views

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
1 vote
0 answers
589 views

We have a Web API endpoint defined as follows: [RoutePrefix("orders")] public class OrdersStatusController : ApiController { [HttpGet, Route("{referenceId}/status")] public ...
Craig W.'s user avatar
  • 18.2k
0 votes
2 answers
3k views

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
1k views

Im trying to create a GET request that can handle few optional searching/filter params. The request should look like: https://localhost:99999/api/computers?ModelName=asus&RAM=2&ScreenSize=22 ...
AnonyXplorer's user avatar
1 vote
1 answer
226 views

I have controllers AController and BController and both of them has a method that name is upload. This is the sample code; public class AController : ControllerBase { [HttpPost("[action]"...
doğan 's user avatar
  • 369
1 vote
0 answers
114 views

I'm not looking to start a holy war but looking for maybe a document on best practices for creating APIs which contain multiple HTTP verbs. I inherited a 4.7.2 Web API project and trying to straighten ...
Dave's user avatar
  • 11
0 votes
0 answers
520 views

Hello I'm getting a problem not getting hit into Program.cs . We converted this project from previous .NET core . Now we are using latest .NET core 5 web api . I think when the first application run ...
Rifat Murtuza's user avatar
1 vote
1 answer
45 views

I have the following two methods defined in my WebAPI controller: public class SocketController : ApiController { [HttpGet] [Route("api/socket")] public List<SocketInfo> ...
Yossi G.'s user avatar
  • 1,171
0 votes
1 answer
451 views

I am trying to find the difference in terms of how URL matching is different in both these frameworks I know the following is true for ASP.Net Web API, would like to know is it true for ASP.NET core ...
Rishi Tiwari's user avatar
  • 1,049
0 votes
1 answer
176 views

I am using WebAPI2 .NET5 to create a controller that Inserts records into our database. I would like to know if it is possible to pass additional parameters to the HttpPOST method ? I specifically ...
Mable's user avatar
  • 13

1
2 3 4 5
21