Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6320685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:01:09+00:00 2026-05-24T16:01:09+00:00

I have a new MVC3 project setup, and I added a folder inside my

  • 0

I have a new MVC3 project setup, and I added a folder inside my controller named “area1”.

I then put my controller inside that folder named abc.cs:

public class abc : Controller
{
        //
        // GET: /abc/
    public ActionResult Index()
    {
        return Content("abc index");
    }

}


public class MyAreaRegistration : AreaRegistration
{
    public override string AreaName
    {
        get { return "My Area"; }
    }

    public override void RegisterArea(AreaRegistrationContext context)
    {
        context.MapRoute(
            "abc",
            "area1/{controller}/{action}/{id}",
            new { controller = "abc", action = "index", id = UrlParameter.Optional }
            );

        // And so on ...
    }
}

Now when I go to:

/area1/abc/index

I get an error page.

The resource cannot be found.

I put a breakpoint in the RegisterArea method and it doesn’t get called.

What am I doing wrong?

Other Few questions:

  1. can I put my areas folder and controller code anywhere in the project, or does it have to be inside the main controllers folder?

  2. can I have my views in my areas folder also?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:01:10+00:00Added an answer on May 24, 2026 at 4:01 pm

    I’m not sure what you mean by

    and I added a folder inside my controller named “area1”.

    Since your controller is a class, it doesn’t make sense to add a folder to it.

    The process to create an area goes something like this:

    1. In Visual Studio, right click on the project root, and select Add|Area

    2. Enter the name for the area – Area1 or what have you.

    3. VS will create ~/areas/area1, and add the Views, Controllers and Models folders.

    4. Add, for instance, IndexController.cs to the Areas1/Controllers folder.

    5. Add a view, “Index.cshtml”, to the Area1/Views folder

    6. Rebuild the solution.

    7. Open http://localhosdt/area1/index in your browser, and you should see your view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a new MVC3 project with one Controller called PublicController.cs which contains 4
I have a new project which simply put, is an attempt to formalize the
I have some C# code in my ASP.NET MVC3 project that's throwing an exception
As I have been following a MusicStore tutorial, new MVC3 project created a following
I have an MVC3 site that I've setup for testing another site - most
I have an ASP.NET MVC 3 application that uses the Ninject.MVC3 extension to setup
When we have new in C#, that personally I see only as a workaround
I have a new ASP.NET MVC project (my first), and I had been running
We have a new application that requires glibc 2.4 (from gcc 4.1). The machine
I have an MVC3 project I created using the Code First paradigm and it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.