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

How to achieve versioned WebApi at /api/v1

I want to build a versioned WebApi into an existing MVC project so that my URLs could be /api/v1/account /api/v2/account I do not use Areas at the moment but after some research I thought this could work for me but apparently you cannot nest Areas…
Chris
  • 26,744
  • 48
  • 193
  • 345
3
votes
1 answer

Calling Action of Area from main page in mvc4

I have one project where I have Index page in my main site. I want to call action of the controller which is in area "ABC" I have controller "Account" in both i.e. in my main site as well as in my area ABC. From main site page I want to call Action…
3
votes
1 answer

ASP.NET MVC 2 Areas and route priority

Is it possible to set route priority in asp.net mvc 2 using arearegistration? I have a catch all {*pagePath} route which I want to set the lowest priority on.
marcus
  • 9,616
  • 9
  • 58
  • 108
3
votes
2 answers

Areas over multiple projects - Views not found in child projects

I've been following this guide from MSDN about "Creating an ASP.NET MVC Areas Application Using Multiple Projects". Since ASP.NET MVC 2.0 is just preview one would imagine there to be some bugs. My problem is, it simply doesn't work! At least not…
Filip Ekberg
  • 36,033
  • 20
  • 126
  • 183
3
votes
2 answers

Securing asp.net mvc area with client certificate

I have some troubles with configuring requesting for client certificate to protect mvc area. I can easily configure this for whole application, but is it possible to do this only for one area (admin for example) ?
3
votes
1 answer

Add data to a common _Layout.cshtml from an MVC area's _Layout.cshtml

I have an ASP.NET MVC 4 site organized into multiple areas. Each area has a Views/Shared/_Layout.cshtml view which references a common shared layout. In the common layout, I have a sidebar which contains a list of items. I would like the ability…
Lucas
  • 8,035
  • 2
  • 32
  • 45
3
votes
1 answer

Limiting ExceptionFilterAttribute to one specific MVC Area

In my project I have different Areas. I have added one ExceptionFilterAttribute for handling errors(custom). I don't want to add this attribute to all controllers manually, i want to register this attribute to a specific Area, so…
Bibin
  • 215
  • 2
  • 4
  • 10
3
votes
1 answer

MVC4 Shared Templates

I have a couple of MVC4 projects, and I'd like to make a set of display / editor templates that are reused across these projects. I'd like to create a common project that contains these templates, and reference it in the other projects. So I have…
p.s.w.g
  • 146,324
  • 30
  • 291
  • 331
3
votes
2 answers

How to use different Entity Framework DbContext in the Area of ASP.NET MVC application?

Currently I am building a web application with MVC 4 and Entity Framework code first scenario. In the main structure of my application, I have a Dbcontext(BlogDB) to manage some Blog classes. It works fine as it created all the tables I need in the…
3
votes
3 answers

MVC Routing and Areas - how to construct a route to match action on default controller in area?

I've got a simple MVC4 web site containing an area (called "User") containing a Controller called "HomeController". On this controller there are two action methods: Index and Details: public class HomeController : Controller { public…
Paul Suart
  • 6,505
  • 7
  • 44
  • 65
3
votes
1 answer

MVC Areas and routing issue

I'm having some issues getting Areas working correctly within MVC 3. I have the following folder structure and an Admin area set up: I'm trying to navigate from the admin page (Index) to the the other view pages in the Admin area for example…
dtsg
  • 4,408
  • 4
  • 30
  • 40
2
votes
2 answers

When using OutputCache with MVC, sub.domain.com gives me www.domain.com cached page

I have a single ASP.NET MVC app which uses areas to deliver different functionality depending which url is hit. For example www.domain.com - Website Area app.domain.com - Application Area *.domain.com - Client Area So, the point is that depending…
2
votes
3 answers

Models in asp.net mvc 3 areas

How to organize models in multiple areas ? I am trying to organize code using areas. I am using visual studio 2010 express , the project is on asp.net mvc3 and code-first development is used. All the tutorial and reference over internet only talks…
amarnath chatterjee
  • 1,942
  • 16
  • 15
2
votes
1 answer

How to specify namespace in custom route handler for MVC3?

I have written a custom route handler. Because I have Areas in my web site with conflicting controller names, I am getting the error: Multiple types were found that match the controller named... I think I need to specify a namespace in my handler,…
2
votes
3 answers

MVC 3 Area Registration and Views not working

I seem to be having an issue with either namespacing or Registration. At this point, I am leaning more towards area and registration issues with MVC 3.0, but I am open to any ideas here. My CAPAreaRegistration.cs file looks ike this: namespace…
gcoleman0828
  • 1,541
  • 3
  • 30
  • 49