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
1 answer

In AspNet.Core the Tag Helper asp-area doesn't work

I recently updated the Visual Studio for Update 3 and ASP.Net Core for 1.0.0. I followed the tutorial in documentation and I tried set up for use Areas like this https://docs.asp.net/en/1.0.0/mvc/controllers/areas.html However, the link generated…
Renatto Machado
  • 1,534
  • 2
  • 16
  • 33
3
votes
1 answer

Second layer of authentication in ASP.NET MVC2 application

We have an ASP.NET application that's partly in MVC (the rest of it being a legacy webforms-based CMS). The application is authenticated via Forms Authentication, although any user accessing it from a specific set of IP addresses are automatically…
3
votes
2 answers

Possible to [Authorize] at the Area level in ASP.NET MVC 2?

Slapping on [Authorize] attributes on Controllers and Actions to restrict access is awesome. Is it possible to do the equivalent for an entire Area in MVC 2? Where I can restrict Area-wide access dependent on Roles/Users/whatever in a central place…
kdawg
  • 2,019
  • 21
  • 31
3
votes
2 answers

ASP.NET 5/MVC 6 area functionality in multiple projects

We are building a very large web site that will consist of a main site with many sub sites. These could typically be implemented in areas, but the development cycle and teams for these sub sites are disparate. We want to be able to deploy only a…
EricksonG
  • 472
  • 4
  • 10
3
votes
1 answer

How can I redirect unauthorized users to a login page based upon the area?

I've got an ASP.NET MVC5 website that will be divided into public and administrative sections. There is optional authentication on the public side, with some views restricted to only authenticated users with the appropriate role. If users attempt…
Beofett
  • 2,388
  • 1
  • 23
  • 37
3
votes
3 answers

How to redirect from AREA's cshtml page to normal controller's ActionResult using @Url.Action?

How can I redirect to an ActionResult of a normal controller from .cshtml page of my Area's view? I have a common login screen for normal/admin user. So based on the usertype json result will return the user type. So now I want to redirect a user…
3
votes
1 answer

Use RedirectToRouteResult with Area failed

I'm using custom filter that check user access permission to specific Action and I have area called Admin. When filter redirect unauthorized user, its redirected inside area but not to the view in route directory. For example, when I access…
andrey.shedko
  • 3,128
  • 10
  • 61
  • 121
3
votes
2 answers

Generating URLs for ASP.NET MVC Area routing with subfolder

I have an ASP.NET MVC app which has areas with special routes as following: Area registration file: context.Routes.MapHttpRoute( "AccessControlApi_default", "accesscontrol/api/{controller}/{id}", new { id = RouteParameter.Optional } …
AlBaraa Sh
  • 2,202
  • 3
  • 20
  • 29
3
votes
1 answer

Can not use _Layout from areas in asp.net

I have the following structure: I want to use different master page for Admin Areas. Links to Views in Admin _Layout look like "~/Admin/Home/Welcome"
jbakirov
  • 936
  • 2
  • 10
  • 15
3
votes
1 answer

ASP.NET MVC Areas with angularJS app

How to use AngularJS framework with Asp.net MVC "Areas"? I am developing an application with having large user base and large database tables (i.e. around 5 Millions of row for 8/10 tables). So, I had plan to use AngularJS for handling data…
3
votes
1 answer

ASP.Net MVC per area membership

I am building an ASP.Net MVC app that will run on a shared hosting account to host multiple domains. I started with the default template that includes membership and created an mvc area for each domain. Routing is set up to point to the correct…
3
votes
2 answers

MVC5 Custom Route to Remove Controller Name from Area

So far I can't make this work and I need some assistance please. I have a basic MVC 5 site, and I have added an area called Administration. For the life of me, I can't figure out how to set a default controller/action for an area, properly. In…
clockwiseq
  • 4,189
  • 9
  • 38
  • 61
3
votes
1 answer

ASP.NET MVC routing parameters not working with areas

I'm currently playing around with areas and routing within them. What I'm trying to achieve is to be able to have a URL that looks like this; PracticeAdmin/Practice/[Practice Name] which I would then be able to add things like Edit and Delete to…
Sam Jenkins
  • 1,284
  • 1
  • 12
  • 30
3
votes
2 answers

Syntax to specify Namespace when using helper.RouteUrl

I am using Asp.Net MVC 2 - RC w/ Areas. I am receiving an ambigious controller name exception due to having same controller name in two different areas. I've read Phil Haack's post Ambiguous Controller Names With Areas I can't figure out the syntax…
B Z
  • 9,363
  • 16
  • 67
  • 91
3
votes
2 answers

MVC 5 Multiple Types Matching Controller

I know there are lots of questions and posts about this particular error on Stackoverflow, however, anything I seem to try still does not fix the problem. I have an MVC 5 web application which has two Account Controllers, one in the default…
tcode
  • 5,055
  • 19
  • 65
  • 124