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

  • Home
  • SEARCH
  • 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 4337368
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:56:05+00:00 2026-05-21T10:56:05+00:00

I have a MVC and Asp.net hybrid Application I have one controller but it

  • 0

I have a MVC and Asp.net hybrid Application I have one controller but it doesn’t have any home controller, I don’t want to start application from mvc view I need to start from default.aspx

When I write “default.aspx” at the end of url it works fine. but it doesn’t work when I write mysite.com/

Also I have a web service but it isn’t working now. because of routing like : “mywebservice.asmx/mymethodname”

How I can set my global.asax ? what configuration I need for running in this combination?

  • 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-21T10:56:06+00:00Added an answer on May 21, 2026 at 10:56 am

    You could just create your MVC application in a sub folder of your web application and then move any Global.asax configuration to your WebForms app

    You will just need to update your routing, if your MVC app was created in a folder called MVC it might look something like this:

               routes.MapRoute(
               "MVC default",                                              
               "MVC/default.aspx",                                         
                new { controller = "Home", action = "Index", id = "" }  
              );
    
            routes.MapRoute(
               "Services",
               "MVC/{controller}/{action}/{id}",
               new { controller = "Home", action = "Index", id = "" }
                );
    

    Edit:

    Actually you would need to map sure your views are mapped correctly too, you could do this by creating a quick custom view engine:

            public class CustomViewEngine : System.Web.Mvc.WebFormViewEngine
    {
        public CustomViewEngine()
        {
            base.ViewLocationFormats = new string[]
            {
              "~/MVC/Views/{1}/{0}.aspx",
              "~/MVC/Views/{1}/{0}.ascx",
              "~/MVC/Views/Shared/{0}.aspx",
              "~/MVC/Views/Shared/{0}.ascx"
            };
    
               base.PartialViewLocationFormats = new string[] {
             "~/MVC/Views/{1}/{0}.aspx",
              "~/MVC/Views/{1}/{0}.ascx",
              "~/MVC/Views/Shared/{0}.aspx",
              "~/MVC/Views/Shared/{0}.ascx"
            };
    
               base.MasterLocationFormats = new string[]
            {
              "~/MVC/Views/{1}/{0}.master",
              "~/MVC/Views/Shared/{0}.master"
            };
        }
    
    }
    

    and then registering it in your global.asax:

            System.Web.Mvc.ViewEngines.Engines.Clear();
            System.Web.Mvc.ViewEngines.Engines.Add(new CustomViewEngine());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In ASP.NET MVC I have a controller that looks somehow like this: public class
Can I have an ASP.MVC 3 application running in my site root (a simple
I've seen the question for MVC ASP.NET, but was wondering if there was a
Before I reinvent the wheel, ASP.Net MVC 3 Tools Update includes an Internet Application
Yesterday I was having fully compiled ASP.NET MVC 3.0 project. Today when i opened
The beauty of MVC is the separation of concerns, especially coming from the Asp.net
Good time of a day! I have a MVC project with query in controller:
i have learned MVC Architecture from Zend Framework, and i just started learning in
I was researching about multi-tenancy and multi-instance approaches and chose a hybrid. I keep
We're having alot of troubles here with the .ToList command, it's used in VB.NET

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.