This project is read-only.

MVC 3 Application in a virtual directory

Topics: Customizing Orchard, Troubleshooting
Jul 22, 2011 at 10:35 PM


I want to put an MVC 3 application in a virtual directory with Orchard as the default site.  I am getting errors right.

Any idea if this is possible?

Jul 23, 2011 at 12:42 AM

There is an option in web.config to prevent it from bleeding into vdirs.

Aug 10, 2011 at 9:14 PM

Okay.... so what is the option?

Aug 10, 2011 at 9:23 PM

Aug 10, 2011 at 9:42 PM

When I add this option, the theme goes away.

Aug 10, 2011 at 9:44 PM

Goes away how? Are you seeing errors? Files fail to load? What gets rendered if anything?

Aug 10, 2011 at 9:47 PM

500.19 Configuration Error

Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'StaticFile'

at <add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />

Aug 10, 2011 at 9:53 PM

I'm guessing this is not from the root web.config. Well, the choice you have is between fixing the Orchard config files in subdirectories (which also ceased to inherit from the root the moement you set this option) or to fix the one in your sub-app without the option on the root.

Aug 10, 2011 at 10:09 PM

Thanks for your help.

Aug 10, 2011 at 10:19 PM

Let us know how that goes. This might be useful to others.