399 questions
0
votes
1
answer
124
views
MapAreaControllerRoute blocks MapControllerRoute
I have a problem. My MapAreaControllerRoute is blocking MapControllerRoute. That means when I open app in browser localhost:7155 it opens login as normal https://localhost:7155/login.html?ReturnUrl=%...
0
votes
1
answer
462
views
.net 8 Razor Pages routing without default route to @page directive
I have an .net 8 razor page application where i've added page routes from database with the following code:
options.Conventions.AddPageRoute(route.FullName, route.Key.ToString());
For example i've ...
1
vote
1
answer
538
views
ASP.NET Core MVC calling an action from to a view
I try to create an e-commerce websites. I have a page for a product with a button "Add to cart". On this page (SingleProduct.cshtml), I also take quantity of product from customer. This page ...
12
votes
1
answer
9k
views
ApiVersion attribute not working in .NET 8 [closed]
I recently upgraded my webapi to .NET 8. As I test my controller, the ApiVersion attribute is not working in the swagger page.
[ApiVersion("1.0")]
[Route("v{version:apiVersion}/api/[...
0
votes
1
answer
698
views
How to use DynamicRouteValueTransformer to switch between 2 controllers and actions
I have 2 similar controllers in different areas that I am trying to route depending on the user type. For example the two controllers have the index action that is supposed to show the home page;
...
0
votes
0
answers
161
views
Routing classic ASP with ASP.NET webforms
Before starting, I see many answers for MVC but I'm not using MVC.
I just want this but for WebForms, not MVC.
For a hybrid Classic ASP/ASP.NET WebForms project, I'm trying to setup simple routing ...
0
votes
1
answer
103
views
Have 2 controllers with the same route in different areas
I have 2 controllers in 2 different areas that will display a different page on the home page depending on the type of user.
The controller actions are at;
MyApp.Areas.Buyer.Controllers....
0
votes
1
answer
440
views
Blazor routing with regex
I am new to Blazor and looking what are the possibilities with this.
I would like to migrate my asp.net website to blazor.
I actually have urls like this :
www.mywebsite.fr/product/a-12
www.mywebsite....
4
votes
0
answers
270
views
OData 8 - Custom routing with named parameters that do not care about order
In the .NET Framework 4.8 version of the API I'm working on, I could specify the routing to an endpoint as so:
[ODataRoute("/myEndpoint(FirstName={firstName},LastName={lastName})/Data")]
...
-1
votes
1
answer
71
views
.NET Core API redirect to 404 in startup configuration
I have quite tricky challenge to do, my app is going to have 3 different startup options. So 1 application that is differently hosted/has different use cases/routing. This is a design that we have to ...
-1
votes
1
answer
2k
views
Configurable route prefix for controller
I'm using ASP.NET Core 6 and trying to have the base path of my API controller be configurable (so that users can choose the base path themselves to avoid conflicts with other controllers).
I tried ...
0
votes
1
answer
229
views
Why does my ASP.Net 4.8.1 Webform URL still show the query string?
I'm attempting what seems like a trivial set up for friendlier looking URLs with routing. I'm not getting the formatted URL, always the usual one with query strings.
Here is the relevant code for the ...
1
vote
0
answers
55
views
Homepage in ASP.NET SPA
I am developing a project from the .NET React template. I want to create a homepage that would be indexed by search engines with Razor, since React pages aren't SEO friendly.
How could I achieve this?
...
0
votes
1
answer
88
views
.net core web api Routing ex) 2depth /movies/inception/actors/DiCaprio/
web-api
This sample's routing is 1 depth
req:
/movies/inception/actors/DiCaprio/
res:
json DiCaprio birth, DiCaprio hair color etc....
you want to configure rest api server in 2depth.
/movies/{...
0
votes
1
answer
175
views
ASP.NET MVC routing - part of controller name in url
I need a routing that maps
admin/{PartOfControllerName}/{action}
to the controller:
Admin{PartOfControllerName}Controller
For example map admin/post/new to AdminPostController and its New action.
...