1

I have an MVC3 website setup in IIS7, lets say the URL is http://devtest.com, and I would like to setup an ASP.NET 2.0 webapp as a child application. My goal is to hit a URL like http://devtest.com/childapp.

While the MVC app is working fine, when attempting to navigate to the child app, I get an error: "Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."

Is this type of configuration even possible, and if not, can anybody suggest an alternative setup?

tereško
  • 58,060
  • 25
  • 98
  • 150
kmdsax
  • 1,361
  • 9
  • 12
  • What have you used so far? A virtual directory? – cheesemacfly Dec 07 '12 at 19:36
  • 1
    The child application will inherit web.config file settings from the parent application and you will have to specify inheritInChildApplications="false" based upon your needs in the parent web.config file. Search for "nested asp.net mvc application in iis". – Mitul Dec 07 '12 at 20:41
  • Yup I made a rookie mistake by adding this to the child web.config, instead of the parent web.config. This fixed it right away. – kmdsax Dec 07 '12 at 20:43
  • @Mitul you should post your comment as an answer and get the points – Nick DeVore Dec 07 '12 at 21:55

1 Answers1

1

The child application will inherit web.config file settings from the parent application and you will have to specify inheritInChildApplications="false" based upon your needs in the parent web.config file.

links:
1. Nested ASP.NET 'application' within IIS inheriting parent config values?
2. Problems hosting multiple ASP.Net MVC3 applications in an IIS7.5 website

Community
  • 1
  • 1
Mitul
  • 9,734
  • 4
  • 43
  • 60