I'm able to run the same Orchard webrole locally inside the Azure Emulator however when I deploy it to Azure Cloud Services, it fails on the 1st load as shown below.
EDIT: 127.0.0.1:10000 is used by the Bob storage local emulator. I've double checked the cscfg and cscfg files - I'm providing the real blob storage credentials there. Weird. I wonder if Orchard is picking up something from some other file(s) ...
We're using the Orchard 1.6.1 "source code" version and are using the included src\Orchard.Azure\Orchard.Azure.sln
solution (which uses the Orchard.Azure.CloudService
and Orchard.Azure.Web
projects).
Local machine (since it run inside Azure emulator) is Win8/VS2012/.NET 4.5 while OSFamily in cloud service is 3
(i.e. Server 2012).
Question: Does anyone know how to troubleshoot / fix this issue?
Server Error in '/' Application.
No connection could be made because the target machine actively refused it 127.0.0.1:10000
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:10000
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SocketException (0x274d): No connection could be made because the target machine actively refused it 127.0.0.1:10000]
System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) +2724827
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +392
[WebException: Unable to connect to the remote server]
Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result() +95
Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait() +201
Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.CreateIfNotExist(BlobRequestOptions options) +213
Orchard.Azure.AzureFileSystem..ctor(String containerName, String root, Boolean isPrivate, CloudStorageAccount storageAccount) +418
Orchard.Azure.Environment.Configuration.AzureShellSettingsManager..ctor(CloudStorageAccount storageAccount, IShellSettingsManagerEventHandler events) +91
lambda_method(Closure , Object[] ) +92
Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +299
[DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.IShellSettingsManagerEventHandler)' on type 'AzureShellSettingsManager'.]
Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +714
Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +265
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +89
Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +122
Autofac.Core.Resolving.InstanceLookup.Execute() +164
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +206
Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +157
Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +265
Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +89
Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +122
Autofac.Core.Resolving.InstanceLookup.Execute() +164
Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +206
Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +193
Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +193
Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +168
Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +117
Orchard.Azure.Web.MvcApplication.Application_Start() +322
[HttpException (0x80004005): An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.IShellSettingsManagerEventHandler)' on type 'AzureShellSettingsManager'.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +4057733
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +191
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +352
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375
[HttpException (0x80004005): An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.IShellSettingsManagerEventHandler)' on type 'AzureShellSettingsManager'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11702064
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4870277
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.276
Ok, it seems there is a configuration item called DataConnectionString
that was still using local storage even inside the ServiceConfiguration.Cloud.cscfg
file. Now seeing another exception
None of the constructors found with 'Public binding flags' on type
'Orchard.Environment.DefaultOrchardShell' can be invoked with the
available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of
constructor 'Void .ctor(System.Func`1[Autofac.Features.OwnedInstances.Owned`
1[Orchard.Environment.IOrchardShellEvents]],
System.Collections.Generic.IEnumerable`
1[Orchard.Mvc.Routes.IRouteProvider],
System.Collections.Generic.IEnumerable`
1[Orchard.WebApi.Routes.IHttpRouteProvider],
Orchard.Mvc.Routes.IRoutePublisher,
System.Collections.Generic.IEnumerable
`1[Orchard.Mvc.ModelBinders.IModelBinderProvider],
Orchard.Mvc.ModelBinders.IModelBinderPublisher,
Orchard.Tasks.ISweepGenerator)'.
Oh well, one down, ? to go ...