4,151 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
48
views
How to configure ASP.NET MVC (.NET 4.8) app to work under /report location with Nginx?
I have an ASP.NET MVC application (on .NET 4.8). Currently, the DevOps team has set up Nginx to handle requests with: location: / and this works fine.
Now they want to change the setup so the ...
0
votes
1
answer
41
views
ASP.NET: route matching template for traversing a tree structure
I have a tree structure of nodes, where each node has 0-n subnodes. Each node has a set of properties. I would like to expose that structure in a webservice.
let's say my route template for accessing ...
0
votes
1
answer
61
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 ...
0
votes
2
answers
211
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 = "...
0
votes
0
answers
72
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...
/...
0
votes
0
answers
44
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 ...
0
votes
1
answer
65
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....
0
votes
0
answers
44
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}",
...
2
votes
2
answers
84
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.
...
0
votes
1
answer
47
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 ...
0
votes
1
answer
59
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 :
...
0
votes
1
answer
34
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....
-1
votes
2
answers
492
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: ...
1
vote
1
answer
34
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 ...
4
votes
0
answers
145
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([...