578 questions
0
votes
1
answer
49
views
ASP.NET MVC the name of the area should not be a route
In my ASP.NET MVC project, I have areas that have a certain name like Admin but I'd like my route to use iAdmin.
For that I use the RegisterArea where I can specify my route, and it work well :
...
1
vote
1
answer
84
views
ASP.NET Core 8 routing with culture params and also areas
I am working on an ASP.NET Core 8 project where I have
MVC public section
Area -> MVC Admin section
Area -> Razor pages Identity area
Also I have localization to run application in English and ...
1
vote
1
answer
47
views
Where do .resx (resource) files live in a dotnet application when one is using areas?
I'm working on a dotnet application that is using localization. I'm stuck on understanding where my .resx files are supposed to live.
The current file structure looks like this:
- Root
- Views
...
0
votes
2
answers
106
views
.NET Core 6.0 Routing is Not working if i use areas
I have project with areas and normal controller in it. But Area routing is working but normal controller is not working.
Working, but Areas routing is returning 404 :
app.MapControllerRoute(
name: ...
0
votes
0
answers
76
views
ASP.NET MVC area issue on IIS 10
I have an existing ASP.NET MVC application (on .NET 4.8), and I have recently added an area to the application (area is registered and the route is mapped).
When I deployed the app to IIS, it works as ...
0
votes
1
answer
58
views
Multi-lingual routes for areas in ASP.NET MVC
I've got an issue with ASP.NET MVC routing for areas. I set up the routing with language without areas, and it is working fine.
Myrouteconfig.cs:
routes.MapRoute(
name: "LocalizedDefault&...
0
votes
0
answers
327
views
Areas in ASP.NET Core 6 MVC application
I am going to build an ASP.NET Core 6 MVC application with SQL Server 2019. The possible users of my application are employees and students.
The employees may be teachers, accountants, managers. The ...
2
votes
0
answers
595
views
Microsoft Identity UI Account Controller Customization 404
I have set up a Azure B2C OpenIdConnect system for our website using Microsoft Identity Web (https://github.com/AzureAD/microsoft-identity-web}. I could sign-in and out of the system with out issue. I ...
0
votes
1
answer
520
views
Why is this ActionLink to another area not working?
I am testing how to build an action link to a page in another area, and every source I find says to use
Html.ActionLink("[Link Text]", "[action name]", "[controller]", ...
1
vote
1
answer
875
views
How to load a partial view from ASP.NET MVC application root into area view?
I have an area in my ASP.NET MVC application that needs to make use of partial views stored in the main application.
The code in question is being migrated from the main application into an area for ...
0
votes
1
answer
236
views
.NET CORE incorrect controller routing
I have a problem with controller actions not returning views. They are looking in the wrong area.
I'm new to core but I've tried to read up online for material and I'm seeing a lot of Global.asax.cs, ...
3
votes
1
answer
5k
views
How to use an area for login in ASP.NET Core 6 MVC
I used the default method to create an area. Right-click on project and add a new scaffolded item. Selected area, gave it a name and it created the folder structure.
My area is called Login. I created ...
0
votes
1
answer
143
views
Get ASP.NET MVC area in Global.asax
Is there a way to get the ASP.NET MVC area in the global.asax, specficially the method below?
public override string GetVaryByCustomString(HttpContext context, string arg)
{
if (...
0
votes
1
answer
567
views
Virtual File System and Areas
I'm trying to use Areas in my ASP.NET Core ABP project like so:
Folder Structure
I'm trying to add a single file bundle like this:
<abp-script src="/Areas/Community/Pages/Mentors/Index.js"...
2
votes
3
answers
2k
views
Visual studio 2019 Add Area missing
Currently, I created a ASP.NET Core Web app using VS2019, came across that 'Add Areas' option is missing from Context menu.
I tried this solution and Add New Scaffolded Item but there is no MVC Area ...
3
votes
3
answers
18k
views
The layout view '~/Views/Shared/_Layout.cshtml' could not be located
The below image shows the project structure I am working on:
Inside Areas -> Billing -> Views -> _viewstart.cshtml, I have specified the path to the layout which I want to apply to the ...
0
votes
1
answer
3k
views
How asp-area tag helper works with area routing?
I have following HTML
<a asp-area="Admin" asp-controller="Page" asp-action="PageTexts" asp-route-pageId="1">
Homepage
</a>
which generates ...
0
votes
1
answer
249
views
In my MVC .NET Core 3.1 project, how can I prevent the anchor tag helper from appending Area to the querystring?
I'm migrating an old MVC web application from Visual Studio to Visual Studio Code, and am using .NET Core 3.1.301. The application uses areas. I'm attempting to create a link from this site's home ...
0
votes
2
answers
1k
views
Areas, pages, and layouts in .NET Core 3.1
I have created a blank template MVC project with user accounts in Visual Studio 2019, i.e. ASP.NET Core Web Application -> Web Application (Model View Controller), Authentication = Individual user ...
0
votes
0
answers
154
views
MVC5 Areas causing extremely slow build times
I've joined a new team who are maintaining and updating a large enterprise MVC 5 application with razor views. On top of the main web, we have a bout 20 different areas with a shared layout 5. We're ...
0
votes
0
answers
394
views
I want to create sub area within are in asp.net core web application
Application
-> Area
-> Customer
-> New Customer
1. NewCustomerListController.cs
2. NewCustomerImportController.cs
-> Old Customer
1. ...
0
votes
0
answers
674
views
Cookie Authentication not redirecting after user login in asp.net core 3
I can't quite wrap my head around this problem, When a user navigates to the admin URL, they are redirected to admin specific account/login page (located in admin Area's folder). But when the admin ...
0
votes
0
answers
358
views
.Net Core/MVC Mulit-Tenant Attritubute Routing using Areas with duplicate routes between different controllers
I am trying to create one .NET Core MVC app that serves up different content (that i defined as areas) based on the domain. I am using a constraint that will serve up the appropriate area based on the ...
1
vote
1
answer
83
views
Should I put my ASP.NET Core API controllers in a special area?
I've recently started a new project and I'd like to expose an API. Should I put the API controller in a special area (e.g. API) or should I just put them along with the other controllers, or even mix ...
4
votes
1
answer
971
views
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
<a asp-action="Index2">Index2</a>
it does not properly create the link I want (Does not create area name)
...
1
vote
0
answers
127
views
.NET Core 3.0 Default routing to an Area
I'm currently working on a .Net Core 3.0 project and I'm having trouble with the default routing using the UseEndpoints in the Configure function in start up.
app.UseEndpoints(endpoints =>
{
...
2
votes
1
answer
692
views
Html.BeginForm is automatically adding a sub-folder after the area
I have created an Area named B2b in my ASP.NET MVC application, and I have also created a sub-folder called Shopify under this area:
In order to register the Shopify sub-folder, I have created a ...
0
votes
0
answers
315
views
Kendo(Telerik) Does not work with Areas in ASP .Net Core MVC
I hope someone could handle my issue.
I am working on ASP.NET Core MVC, in which I have successfully added Telerik UI ASP.Net MVC(Kendo).
I can use now the wizard and widgets in _layout, But The ...
0
votes
1
answer
477
views
Adding a sub-folder under Area and configuring View Engine to search the views in the sub-folder
I am working on an e-commerce website. The website connects to several 3rd party applications, such as Shopify. I have created an Area for this purpose and called B2b (business to business)...
I ...
1
vote
1
answer
3k
views
Area endpoint routing in asp.net core 3.1
this is a simple question and im just asking out of curiosity
ive set up endpoint routing to area as such:
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
...
1
vote
0
answers
578
views
Getting error resource not found with AREA in ASP.NET MVC
Server Error in '/' Application. The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, ...
4
votes
0
answers
391
views
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,...
0
votes
1
answer
940
views
Areas option in solution explore not display in visual studio 2019
Today I updated visual studio 2019 to version 16.3 to 16.4 but problem that i am unable to see or add Areas in my current project solution explore
how to solve this problem ?
-1
votes
1
answer
230
views
"This page could not be found on localhost" - after adding Area, in ASP.NET MVC Core 2.2
My project was rebuilt into folders called "area", everything worked before and the user was authorized to the account management panel. After adding these areas, the project cannot see where it ...
0
votes
1
answer
171
views
How to use Area(in MVC) in different Solutions
I created an area named Hello in a solution named XYZ. I then created a nuget package from this solution and referenced it into my solution named ABC.
Now I'm facing issue with routing or I even might ...
6
votes
2
answers
3k
views
Mapping Subdomains to Areas in ASP.Net Core 3
What I want to achieve
Mapping my normal domain e.g. example.com to no area if possible.
Mapping my subdomain e.g. blog.example.com to a area named blog.
What I have found
There are actually quite a ...
1
vote
0
answers
34
views
MVC 5 ActionLink with Areas
http://localhost:55201/SERVICES/customers/CALLME
how to make this link using @Html.ActionLink
Services is RouteArea, Customers is RoutePrefix and Customer is Controller
@Html.ActionLink("Click me", ...
0
votes
1
answer
367
views
Problems with routing to areas in ASP NET MVC after the project is published
I've created the project in ASP.NET MVC with two areas, and its structure is on the picture:
When I start it, it takes one of two routes depending on the IP address of the user. the code itself is ...
-1
votes
1
answer
72
views
Is it possible to have separate DB for each areas in .net-core along with project's DB?
I need to create separate database for area in a project. I don't want to join two database together. is it possible or not ?
Actually I wanted to have totally separated projects in one solution but ...
0
votes
1
answer
580
views
Route user to correct area
When a user logs in. I'm looking for a way to route a user to the correct area based on their role in identity.
I've tried:
You have the default controller that you can redirect to that area return ...
3
votes
1
answer
18k
views
Asp.Net Core Area routing to Api Controller not working
I have an API controller hosted in an area. However, the routing doesn't seem to be working as my ajax calls keep returning 404's when trying to hit the controller actions. Breakpoints in the ...
2
votes
1
answer
1k
views
UrlHelperExtensions.Page Method for Areas
How can one include an Area in the UrlHelperExtensions.Page Method?
The docs don't mention areas.
When I want to link to a page in an area (in my case Identity) the page name is not found:
var ...
0
votes
1
answer
384
views
ASP MVC Areas and Angular Lazy Loading paths
I have this working but in an inelegant fashion
(1) Angular
This puts it's output in the folder
~/Areas/AreaName/Views/ControllerName/ClientApp/(all angular files here)
It has paths like
<...
0
votes
1
answer
178
views
Vue app with .NET core backend api with Areas, using webpack, Vue is not loading
I've recently taken on the task of merging 2 apps with a decent amount of overlapping functionality into one app. I'm using Vue as the front end library and consuming data from a .NET core back end. ...
1
vote
2
answers
154
views
Returning a generic error-view from an area: how to use the _Layout wrapper from the controller's area?
I have a BaseControllerwith an errorview function, which works fine:
public ViewResult ErrorView(string error, string errormessage)
{
ViewBag.ErrorType = error;
ViewBag.ErrorMessage = ...
0
votes
1
answer
472
views
How does the ASP.NET Web API project template use this HelpPage area like it weren't an area?
Open a new ASP.NET Web API project in Visual Studio 2017 Community (or whichever edition) and run it and you'll see a welcome page with an API hyperlink.
Click the hyperlink and it takes you to the ...
1
vote
1
answer
846
views
MVC going to the wrong view using area in mvc
I have an area name HR. here is the HRAreaRegistration.CS
namespace WebApplication1.Areas.HR
{
public class HRAreaRegistration : AreaRegistration
{
public override string AreaName
...
2
votes
2
answers
238
views
ASP.NET MVC areas return blank view
I have one ASP.NET MVC application which also has areas in it.
For short URL I have set route all actionmethods with short URLs in RouteConfig of areas like below.
//admin dashboard having short URL ...
5
votes
2
answers
4k
views
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 ...
2
votes
1
answer
968
views
.net core routing to a razor pages area based on current domain name?
I'm currently trying to architect a application to host multiple websites from a single .net core application.
Ideally, I would like to show completely different Razor pages based on the domain name ...