Questions tagged [asp.net-mvc-areas]

An organizational concept present in ASP.NET MVC, that allows the developer to partition a large web application into smaller units.

An organizational concept present in ASP.NET MVC, that allows the developer to partition a large web application into smaller, distinct units. Areas might be used to, for instance, divide an application into inventory, review, storefront, and administration modules.

More information

575 questions
4
votes
1 answer

Asp.Net MVC 3 - Map a separate route that already belongs to an area

First keep in mind I am new to nop/mvc, and despite my best effort can find no solution to this seemingly simple task. I have been defining custom routes for a plugin I am making, and so far it's been going fine. Any routes I define have worked…
4
votes
2 answers

asp.net mvc 3 areas and url routing configuration

I have problem with create ulr routing for asp.net mvc3 application. My project has this structure : Areas EmployeeReport Controllers Report Views Report List .... Controllers Login Viwes Login ...…
Mennion
  • 2,873
  • 3
  • 20
  • 34
4
votes
1 answer

asp-action tag helper does not create the Area link properly with Endpoint Routing

i'm using .net core 3.1.1 in mvc area when i use asp-action like this Index2 it does not properly create the link I want (Does not create area name) The link it creates: http://localhost:49770/Home/Index2 But this is the…
4
votes
0 answers

Anchor tag helper not generating correct route to area

I'm afraid that I am at the end of my tether and cannot find a solution. I have exhausted my Google-fu abilities and am now having to ask for help. I'm afraid I am a novice and that this may be simple, this is for a small project I am using to…
4
votes
2 answers

Bind a Global Action Filter to all Controllers in an Area using MVC 3 Dependency Injection with Ninject 2.2

I was able to to use ASP.NET MVC 3 and Ninject 2.2 to inject a logger object into a custom ActionFilterAttribute thanks to the help I received in this post. Now I would like to bind my custom ActionFilterAttribute only to all controllers that are in…
4
votes
2 answers

Extensible ASP.NET MVC Web Application

I need to write a web application with ASP.NET MVC 3 that should be completely modular and extensible. A module/extension would be, for example - a forum, a blog or a content module. I thought about using multi-project MVC areas for this purpose, so…
Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288
4
votes
2 answers

How can I get test coverage around AreaRegistration.RegisterAllAreas in ASP.NET MVC?

So I'm shooting for 100% coverage on an MVC3 site, and we're using areas. I can get coverage on everything else EXCEPT for this one line in Application_Start: AreaRegistration.RegisterAllAreas(); I've already thoroughly tested each area's…
4
votes
3 answers

Does ASP.NET MVC create default routes for areas

I have a couple of areas in my MVC 3 application Auth and Users. I am using Phil Haacks Route Debugging tool to view a list of my routes and see which one gets selected based on my url. However there are a couple of routes present that I have not…
Cragly
  • 3,554
  • 9
  • 45
  • 59
4
votes
1 answer

ASP.NET Core 2.0 webApp shows 'view Index was not found...' after publishing to iis

I recently migrated my ASP.NET Core MVC Project to ASP.NET Core 2.0. The web application was migrated using Visual Studio 2017 version 15.3 Preview. The application works fine in the development mode ( both from Visual studio and using the console…
4
votes
1 answer

AmbiguousActionException in same controller

I've been trying out Asp.NET Core, specifically Areas. Right now I'm running into an issue where I get an exception if I add more than one view to my controller. This is my exception: An unhandled exception occurred while processing the…
nbokmans
  • 5,492
  • 4
  • 35
  • 59
4
votes
1 answer

ASP.NET MVC route doesn't work

I have 2 different routes: context.MapRoute( "zyzzyva_default", "{urlTitle}", new { area = "zyzzyva", action = "Index", controller = "Home", urlTitle = UrlParameter.Optional } ); and second: context.MapRoute( …
4
votes
1 answer

MVC5 Area not working

I have two Areas in my MVC 5 app that are not working properly. When I use the following Link http://localhost:45970/Admin/Admin the app loads the proper index.cshtml whicxh is located at /Areas/Admin/Views/Admin/Index.cshtml however when I try to…
John Schultz
  • 672
  • 1
  • 10
  • 29
4
votes
1 answer

Custom routing within an area

i have an Area called Members and the following registered routes in the MembersAreaRegistration file: context.MapRoute( "Members_Profile", "Members/Profile/{id}", new { controller = "Profile", action = "Index", id =…
4
votes
2 answers

Why do ASP.NET MVC3 Areas and Razor Views produce this error?

The view at '~/Areas/SomeArea/Views/List/Index.cshtml' must derive from ViewPage, ViewPage, ViewUserControl, or ViewUserControl. The project structure is pretty much default. There is one area called SomeArea. It has a single controller called List.…
Aaron
  • 41
  • 1
  • 3
4
votes
1 answer

MVC 6 Areas and multiple login pages redirect

I'd been searching for a solution to this problem for quite a long time but unfortunately haven't found any nice and elegant way to handle it. Here are the details: My MVC 6 application use Areas. Each area has separate directories for the…
Konrad
  • 43
  • 1
  • 4