asp.net-mvc-routing Questions

9

I am beginner in ASP .NET Core 2.1 and working on project which is using ASP .NET Core 2.1 with individual authentication. I want to make my login page as my default route instead of Home/Index: ...

18

Solved

PLEASE NOTE: This question was asked in 2016. The original answer to this problem was to update the microsoft api versiong package. In the current days, the problem reoccurs, but for other reasons....

4

Solved

In MVC, I know we can get parameters from a get request like this: Request: http://www.example.com/method?param1=good&param2=bad And in controller public ActionResult method(string param1,...
Pinter asked 17/2, 2014 at 15:12

9

I have been stuck on this issue for several hours now. I have a controller called 'DecisionPoint' and I have a breakpoint set on it's 'ApplicationState' action. No matter what I try I keep getting...
Clamant asked 16/5, 2011 at 1:35

17

Solved

I'm trying to navigate to a page which its URL is in the following format: localhost:xxxxx/User/{id}/VerifyEmail?secretKey=xxxxxxxxxxxxxxx I've added a new route in the RouteConfig.cs file and so ...

6

Solved

I'm working on moving an API project from raw http handlers where I'm using periods in the paths: http://server/collection/id.format I would like to follow the same URL schema in a Web Api (self...
Jaimiejain asked 15/7, 2012 at 17:48

3

Solved

I want to create an IRouteConstraint that filters a value against possible values of an enum. I tried to google it for myself, but that didn't result in anything. Any ideas?

3

Solved

We are having issues deploying our WebAPI service onto our production server. When attempting to access the Controller we receive "The resource you are looking for has been removed, had its name ch...
Cropland asked 14/12, 2012 at 4:57

6

Solved

I have two action methods that are conflicting. Basically, I want to be able to get to the same view using two different routes, either by an item's ID or by the item's name and its parent's (items...
Perimeter asked 25/6, 2009 at 17:56

3

I have to do a redirecttoaction call in asp.net mvc view with varying params, extracted from the referrer page of the view (the status of a grid). I have (in an hidden field) the content of the qu...
Ikeikebana asked 29/8, 2012 at 14:33

5

Solved

I am using ASP.NET Core 3.1 for my web API. I have multiple controllers all using attribute-based routing and all is well. We want to be able to toggle one or more controllers with feature flags i...
Manifesto asked 20/4, 2020 at 14:20

6

Solved

I want to be able to request static .html files which are located in the ~/Views folder. According to the documentation, the routing system checks to see if a URL matches a disk file before evaluat...
Chaldean asked 30/7, 2013 at 14:12

4

Solved

I would like to pass a javascript variable in a @Url.Action method as a route parameter. I like to pass the screenmode javascript variable as a route parameter to my action method. I have a vie...

3

Solved

I am working on a small ASP.NET MVC project at the moment. The project was released a few month ago. But changes should be implemented for usability and SEO reasons now. I decided to use attribute ...
Rai asked 21/9, 2016 at 16:16

4

Solved

I am developing an asp.net mvc application. I am creating robots.txt for my application to prevent from bots because my current site is getting many robot requests. So I found this link, Robots.txt...
Solstice asked 7/8, 2016 at 5:58

3

I have a robots.txt that is not static but generated dynamically. My problem is creating a route from root/robots.txt to my controller action. This works: routes.MapRoute( name: "Robots", url: "r...
Graben asked 18/6, 2013 at 4:49

16

Solved

I've installed Visual Studio 2013 and when I run my app I get the error below. I've got no idea as to where I'm to initialized this object. What to do? Server Error in '/' Application. The obj...
Overspill asked 14/11, 2013 at 3:52

3

Solved

I received a prototype application built with Asp.Net MVC4. It is currently replacing the default controller factory with a custom one using NInject, ServiceLocator and all. The problem is that by...
Huntsville asked 5/6, 2013 at 20:10

5

Solved

I want to implement a SEO friendly URL for my ASP.NET MVC website. Currently i have a URL like: http://www.domain.com/product?id=productid but now i want to rewrite my URL like: http://www.doma...
Provolone asked 28/2, 2013 at 6:18

4

Solved

I'm working on providing friendly names for my MVC 4 controllers and I want to do something like the [ActionName="My-Friendly-Name"] style, but for the whole controller. I couldn't find any inform...

5

Solved

I need an implementation where I can get infinite parameters on my ASP.NET Controller. It will be better if I give you an example : Let's assume that I will have following urls : example.com/ta...
Navigable asked 22/9, 2011 at 13:36

4

Solved

In Asp.net MVC the url structure goes like http://example.com/{controller}/{action}/{id} For each "controller", say http://example.com/blog, there is a BlogController. But my {controller} porti...
Ilmenite asked 21/7, 2010 at 20:57

4

Solved

I try to add an area to my .NET Core project, but always I see that error: RouteCreationException: An error occurred while creating the route with name '(My Area Name)' My Code is : public vo...
Kufic asked 28/3, 2018 at 12:25

7

Solved

I have a strange problem with my model passed to the View Controller [Authorize] public ActionResult Sth() { return View("~/Views/Sth/Sth.cshtml", "abc"); } View @model string @{ ViewBag.Ti...
Escobar asked 21/3, 2012 at 10:19

17

Solved

The view 'Index' or its master was not found. The following locations were searched: ~/Views/ControllerName/Index.aspx ~/Views/ControllerName/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Ind...
Kine asked 15/2, 2010 at 22:0

© 2022 - 2025 — McMap. All rights reserved.