None of the constructors found with policy

Dec 3, 2010 at 9:59 PM

Hi,

I'm trying out Orchard, and I like it a lot so far, but when trying to deploy the application out to my shared hosting to so a client, I'm having issues.  Everything, naturally, works just fine on my local (both using VS development server and IIS 7), but when I publish it out to my hosting I get:

None of the constructors found with policy 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Mvc.ViewEngines.ThemeAwareness.ThemedViewResultFilter' can be invoked with the available services and parameters:
Constructor 'Void .ctor(Orchard.Themes.IThemeService, Orchard.WorkContext, Orchard.Mvc.ViewEngines.ThemeAwareness.ILayoutAwareViewEngine)' parameter resolution failed at parameter 'Orchard.Themes.IThemeService themeService'.

Any ideas on what I need to change to fix this issue?

The site that's blowing up is:  http://alpha.hallowedgroundproductions.com/ if there's any extra information in the exception that would be useful :)

Thanks!

Coordinator
Dec 4, 2010 at 5:10 AM

What version of Orchard are you using (official 0.8 release or recent dev branch)?

This error usually happens when one of the modules (or themes) can not be loaded or compiled by Orchard. We made changes recently in the dev branch to give a more precise error message.

In the meantime, you can try a couple of things:

1. Delete all the ".csproj" files under "~/Modules" and "~/Themes". These files are only needed if you want to be able to change .cs source files on your deployed server. Restart Orchard and see if that solves the problem.

2. Edit the "~/Config/Diagnostic.Config" file and change the "initializeData="c:\logs\orchard-debug.txt"" attribute to point to a directory writable by your asp.net server on your deployed machine, then change     "<source name="Default" switchValue="Error">" to "<source name="Default" switchValue="Warning">". Finally, change "  <trace autoflush="false"/>" to "  <trace autoflush="true"/>". Restart Orchard, and take a look at the log file for exception messages. They should help you diagnose the problem. Note you should revert the config file to its original value once you are done, as leaving these values are some performance impact.

Dec 6, 2010 at 5:09 PM

I'm using the 0.8 release, should I give the dev one a try?

There weren't any .csproj files in there (I used the Visual Studio publish option, which doesn't copy them.  Should I not be using publish?)

I edited the configs per your instructions, and it created the log file with the following contents:

Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Lucene"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.ArchiveLater"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Blogs"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.CodeGeneration"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Comments"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.ContentTypes"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Email"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Experimental"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Indexing"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.jQuery"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Media"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Migrations"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Modules"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.MultiTenancy"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Packaging"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Roles"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Search"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Setup"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Tags"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Themes"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Users"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "Orchard.Widgets"!
Orchard.Environment.Extensions.ExtensionLoaderCoordinator Warning: 0 : No loader found for extension "TinyMce"!

Any additional assistance would be most appreciated, thanks!

Dec 7, 2010 at 4:28 PM

So, just a little update here.  I removed my 'published' version of the site, and just copied the files up there and it started working.  Any ideas on why publishing the site would break it?  I confirmed that this was the issue on my local machine, as it broke there too when I pointed my iis over to the publish copy.

Thanks!

Coordinator
Dec 7, 2010 at 5:24 PM

Yes: deployin will only work if you configure it to copy all the file: the web projeect doesn't (and can't) know about the module and theme files so it needs to be forced. At this point, deploying through FTP or your hoster's tools might be your best bet.

Coordinator
Dec 8, 2010 at 4:12 AM

FYI: The easiest (and fastest) way to deploy with my hoster is to zip the local Orchard directory, upload the zip file to the web server, and unzip locally (they have a local "unarchive" utility). This takes about 1 min, which is much faster than trying to deploy individual files one by one using FTP.

Jun 24, 2011 at 5:09 PM

I used the WebMatrix publish feature (in FTP mode) to copy the files to my web server and got this same error. I checked the files one by one, no small task, and found that it was missing a bunch of dlls in one of the Core subdirectories. I copied those up there using FileZilla (because once WebMatrix thinks it has copied files it won't allow you to copy them again until you modify them.) But I still had issues with the site not compiling on the server. After an hour of checking files I finally followed the suggestion and uploaded a .zip file to my hosting provider and then used their utility to unzip it. After that everything worked beautifully.