0

我可以在 Azure 模拟器中本地运行相同的 Orchard webrole,但是当我将它部署到 Azure 云服务时,它在第一次加载时失败,如下所示。

编辑:Bob 存储本地模拟器使用 127.0.0.1:10000。我已经仔细检查了 cscfg 和 cscfg 文件——我在那里提供了真正的 blob 存储凭据。诡异的。我想知道 Orchard 是否正在从其他文件中获取某些内容...

我们正在使用Orchard 1.6.1“源代码”版本并使用包含的src\Orchard.Azure\Orchard.Azure.sln解决方案(它使用Orchard.Azure.CloudServiceOrchard.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
4

1 回答 1

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)'.

哦,好吧,一倒,?去...

于 2013-06-25T03:42:32.827 回答