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
5
votes
2 answers

How to have razor find views from another assembly in a template service

I am trying to load a razor view from another project. I have gone down a few different rabbit holes but so far I have not found a way to make this work. However, from my research there seems to be two main ways to get this working. One option…
Swazimodo
  • 1,147
  • 1
  • 15
  • 34
5
votes
2 answers

publish two projects in same solution

I am currently running into an issue where I have an mvc project and an API project in the same solution,Visual Studio 2017. when I build the solution the structure is as follows solution solution/area1 solution/area2 solution/api I am able to reach…
user3842764
  • 53
  • 1
  • 1
  • 4
5
votes
1 answer

Custom errors override in ASP.NET MVC area

I would like to have custom error pages unique to an MVC area. Unfortunately, it appears that the Web.config override system doesn't take the MVC folder structure into account. If I want to override an area called "mobile", I have to create a root…
patridge
  • 26,385
  • 18
  • 89
  • 135
5
votes
1 answer

How to register an area using app_start or webactivator?

I would like avoid having to call AreaRegistration.RegisterAllAreas() in my global.asax, because I'm trying to move all startup logic into individual classes inside of the App_Start folder. However, I've been unsuccessful in getting this to work.…
ssmith
  • 8,092
  • 6
  • 52
  • 93
5
votes
1 answer

MVC controller.Execute with areas

I've a site in MVC4 using areas. In some area (lets call it Area), I have a controller (Controller) with this actions: public ActionResult Index() { return View(); } public ActionResult OtherAction() { return View("Index"); } This works…
Diego
  • 16,436
  • 26
  • 84
  • 136
5
votes
1 answer

Asp.NET MVC 2 Preview 2: Area's aspx namespace problem

I am now testing the new feature of MVC 2 Preview 2 called Areas within one project. Followed the MSDN article as well as the relase notes document I have created the Areas folder, then area's name folder, then Controllers and Views folders within…
twk
  • 3,122
  • 2
  • 26
  • 36
5
votes
2 answers

SimpleMembership password reset hyperlink 401 redirects even with AllowAnonymous

I'm attempting to migrate my MVC4 application from ASP.NET Membership to the new SimpleMembership and have run into a snag with password resets. In my Login view, I have "Forgot Password" hyperlink that does an AJAX post to an action that sends an…
AJ.
  • 16,368
  • 20
  • 95
  • 150
5
votes
1 answer

How to set Area view as home page in ASP.NET MVC?

How to setup route for a view to be as home page of a domain in ASP.NET MVC application which contains Areas. I need a view of a particular area to be home page. How could this be done? I tried using the following code without any success. public…
Brij
  • 11,731
  • 22
  • 78
  • 116
5
votes
2 answers

MVC Areas Routing - Controller Folder with Folder

Currently I have a folder structure like this: Area (folder) - Toolkit (folder) - Controllers (folder) - AdminController.cs - Views (folder) - Admin (folder) - Privledges (folder) - Create.cshtml …
David East
  • 31,526
  • 6
  • 67
  • 82
5
votes
1 answer

Portable Areas Vs Multi project Areas?

Can you please tell me advantages/drawbacks of these two implementations? My context : We have a large project which includes many differents domains. Each domain will naturally be an Area. But many differents teams will work on each and we want to…
Cybermaxs
  • 24,378
  • 8
  • 83
  • 112
5
votes
5 answers

What is wrong with my area routing in my bin deployed MVC4 app?

I have just deployed an MVC4 .NET 4.0 app to my web host, for 'live' deployed testing. Non -area routes are working fine, e.g. my @Html.ActionLink("Register as a Client", "Register", "Account", new { registrationType = "Client"}, null) link works…
ProfK
  • 49,207
  • 121
  • 399
  • 775
5
votes
1 answer

Placing MVC Content folder into Area

First of all, I do understand, that MVC 3 default template's Content folder is not a mandatory css/img/etc. store folder. I still like the concept of Content folder to be a "reference-able" storage location for images and style sheets and other…
Maxim V. Pavlov
  • 10,303
  • 17
  • 74
  • 174
4
votes
1 answer

ASP.NET MVC 3 Areas - Can't Find View With Custom Route

I've got a custom route in an area as follows: context.Routes.Add( "SearchIndex - By Location - USA", new CountryTypeSpecificRoute( CountryType.UnitedStates, …
RPM1984
  • 72,246
  • 58
  • 225
  • 350
4
votes
2 answers

No parameterless constructor, structuremap, new area

I know the error "No parameterless constructor defined for this object" has been asked about a million times. My situation is different I have a working app. Many many controllers and one area with lots of controllers. I just added a new area. I…
Raif
  • 8,641
  • 13
  • 45
  • 56
4
votes
1 answer

Can I place system.web.webPages.razor in my top level web.config when using areas?

I am using MVC Areas. Within each area I have a views section and in that a web config that contains the following:
Samantha J T Star
  • 30,952
  • 84
  • 245
  • 427