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 6980129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:58:29+00:00 2026-05-27T17:58:29+00:00

Can I have an MVC3 application in ~/priv/, and another in ~/pub? It seems

  • 0

Can I have an MVC3 application in ~/priv/, and another in ~/pub?

It seems that if I first put an application in ~/priv/ then when I go to “XXX.XXXXX.com/” it serves the application in ~/priv. Can I solve this with routes? Is there something I am missing? Please help!

Edit:
To be clear, is there a way that the structure can look like:

[root]
  [priv]
  [pub]

so that if someone goes to root neither one is seen, if someone goes to root/priv they the priv app and if someone goes to root/pub they get the pub app.

  • 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-27T17:58:29+00:00Added an answer on May 27, 2026 at 5:58 pm

    You need to make sure of several things:

    • The virtual directories [pub] and [priv] must each be configured as an Application in IIS.
    • If [root] is configured as an application, any applications in sub folders will inherit the values from web.config, even if they run under a different app pools. Make sure this is not causing a conflict or unexpected behavior.
    • Check for the setting runAllManagedModulesForAllRequests=true. If [root] is configured as an Application, it may be intercepting the call fro IIS before it gets to a child application. You may want to add the following to the web.config of [root] (but make sure to override this in [pub] and [priv]:

      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
          <system.webServer>
          <modules runAllManagedModulesForAllRequests="false">
                  <remove name="UrlRoutingModule-4.0" />
              </modules>
          </system.webServer>
      </configuration>
      
    • Then, in web.config for [pub] and [priv] you can add:

      <modules runAllManagedModulesForAllRequests="true">
          <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" />
      </modules>
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an MVC3 application that has a custom HandleErrorAttribute so that I can
I have an MVC3 application, I know that for relative paths, I can use
I have a mvc3 application hosted say on www.mywebsite.com , how can i customize
I have an MVC3 application that I am implementing pjax into . Everything is
I have an existing MVC3 application and database that is on a SQL Server
Can anyone explain how to have reCaptcha functionality like stackoverflow in my MVC3 application.
I'll give a brief summary first then add detail as I can. I have
I have a MVC3 application that is serving views stored in a database. I
I have a function in my MVC3 application that presents a user with a
We have a MVC3 application that we have created many small actions and views

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.