Skip to main content
0 votes
1 answer
26 views

CatchAll Url redirect to HomePage not working in .NET 8.0

I'm using .NET 8.0 and I've added this line of code so that when the url is not found it can go back to the homepage but it's not working. Got several non-informative errors. I might be getting a ...
choopau's user avatar
  • 2,409
0 votes
2 answers
62 views

ASP.NET Core MVC : MapControllerRoute with generic pattern not allowing POST

I have the following setup created: app.MapControllerRoute( name: "Product", pattern: "product/{*url}", defaults: new { controller = "Product", action = "...
JohnPete22's user avatar
0 votes
0 answers
48 views

Routing with a suffix on the controller name

Given one or more controllers (within Areas), named for example CustomerController and OrderController, I would like to be able to route to them using either of the following at interchangeably... /...
Martin Robins's user avatar
0 votes
0 answers
41 views

.NET Core Routing for unwanted folder or extension

I am implementing the routing in .net Core 8.0 project. First goal is to redirect any .aspx page request to the latest common page. I have placed these combinations to address all possibilities. it is ...
Rajiv Ranjan's user avatar
0 votes
1 answer
47 views

Mapped endpoint doesn't work when using attribute-routing ASP.NET

I hope you are doing OK, I have a project that I am updating and streamlining. BTW I am also learning .NET I have the next problem, when I change this: app.UseEndpoints(endpoints => { endpoints....
Mustafak's user avatar
0 votes
0 answers
34 views

ASP.NET MVC .NET 8.0 prevent route from handling image requests

I have a .Net 8.0 MVC project and in my Program.cs file I have the following route set up: app.MapControllerRoute( name: "ArticlePage", pattern: "/{landingSlug}/{articleSlug}", ...
Matthew Dresser's user avatar
2 votes
2 answers
61 views

How to get route value of action attribute in controller?

I have the action method defined like below: [Route("example-page")] public ActionResult MyAction() { // I want to use "example-page" in here, like a query parameter. ...
Hüseyin's user avatar
0 votes
1 answer
37 views

How to use ASP.NET Core attribute routing to get full path after endpoint name

I am very new to routing in ASP.NET Core. The system I am prototyping has strings with associated names like: /dev/accounting/people = "people string" /test/it/documents = "some it ...
Kerry Thomas's user avatar
0 votes
1 answer
55 views

ASP.NET MVC the name of the area should not be a route

In my ASP.NET MVC project, I have areas that have a certain name like Admin but I'd like my route to use iAdmin. For that I use the RegisterArea where I can specify my route, and it work well : ...
Le Gros-Porteur's user avatar
0 votes
1 answer
29 views

asp.net core link from admin area to non-area not working when there is culture in routing

I have asp.net core app which has admin, Identity and public (non-area) and I have also implemented culture in routes as first parameter app.UseEndpoints(endpoints => {     endpoints....
alamnaryab's user avatar
  • 1,484
-1 votes
2 answers
247 views

.NET Core 6.0 Routing is Not working if i use areas

I have project with areas and normal controller in it. But Area routing is working but normal controller is not working. Working, but Areas routing is returning 404 : app.MapControllerRoute( name: ...
Abhijeet Patil's user avatar
1 vote
1 answer
31 views

ASP.NET MVC MapControllerRoute for /CategoryNameHere

In Program.cs how do I write app.MapControllerRoute to take / to my HomeController.cs public IActionResult Index() and /CategoryNameHere to my CategoryController.cs public IActionResult Index(string ...
s15199d's user avatar
  • 7,739
4 votes
0 answers
111 views

Overload action method in ASP.NET Core 8 MVC based on type of http body

I want to write some API with single URL and want to route based on body type like below [HttpPost] [Route("{input: OverloadModelA}")] public IActionResult OverloadInsert([...
sorosh_sabz's user avatar
  • 3,033
0 votes
1 answer
222 views

Migration to .NET 6 and routing problems

I used .NET Upgrade Assistant to upgrade an ASP.NET Core 2.2 web application to .NET 6.0. And I started having routing problems such as No webpage was found for the web address: https://localhost:...
Bruno Correia's user avatar
1 vote
1 answer
156 views

ASP.NET Core API: Handling 404 Errors for Endpoints

I'm developing an ASP.NET Core API and facing an issue where the request to the api endpoint (/api/plants/search) consistently returns a 404 error, despite seemingly correct controller and routing ...
Philipp's user avatar
  • 51

15 30 50 per page
1
2 3 4 5
277