我可以在Azure模拟器中本地运行相同的Orchard webrole但是当我将其部署到Azure云服务时,它会在第一次加载时失败,如下所示。
编辑:Bob存储本地模拟器使用127.0.0.1:10000。我已经仔细检查了cscfg和cscfg文件 - 我在那里提供真正的blob存储凭据。奇怪的。我想知道Orchard是否正在从其他文件中获取某些内容......
我们正在使用Orchard 1.6.1 "source code"版本并使用包含的src\Orchard.Azure\Orchard.Azure.sln
解决方案(使用Orchard.Azure.CloudService
和Orchard.Azure.Web
项目)。
本地计算机(因为它在Azure模拟器中运行)是Win8 / VS2012 / .NET 4.5,而云服务中的OSFamily是3
(即Server 2012)。
问题:有谁知道如何解决/解决此问题?
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
答案 0 :(得分:0)
好吧,似乎有一个名为DataConnectionString
的配置项仍然在ServiceConfiguration.Cloud.cscfg
文件中使用本地存储。现在看到另一个异常
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)'.
哦,好吧,一个下来,?去... ...