Autofac Dependency Resolution Exception on Azure (Orchard 1.8.1)

Topics: Troubleshooting
Sep 3, 2014 at 8:50 PM
Hello,

I have an Orchard project with many custom modules i've developed. I have no problem running Orchard.Web on local machine.

But on Azure, every path returns 404, and i get a Autofac.Core.DependencyResolutionException

I have added references to all my modules in Orchard.Azure.Web and when i publish to Azure via Orchard.Azure.CloudService, i get no errors.

Exception Details
2014-09-03 17:53:23,384 [3] Orchard.Environment.DefaultOrchardHost - A tenant could not be started: Default
Autofac.Core.DependencyResolutionException: None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Contrib.Voting.Migrations' can be invoked with the available services and parameters:
Cannot resolve parameter 'AzureRepository.Services.IAzureTableConnectionProvider azureTableConnectionProvider' of constructor 'Void .ctor(Kobikit.AzureRepository.Services.IAzureTableConnectionProvider)'.
AzureRepository.Services.IAzureTableConnectionProvider is a subinterface of ISingletonDependency and the implementing class has a default parameterless constructor, and it works fine on local. I have AzureRepository as a reference in Orchard.Azure.Web but seemingly Autofac can't find it.

If you have any ideas or suggestions for where i should look, it's very much appreciated.

Thanks
Oct 10, 2014 at 7:04 PM
Well, the cause was the change in module names. The module info in the SQL was invalid. Initializing with a new DB solved my issue.
Marked as answer by canbulutb on 10/10/2014 at 11:05 AM