【发布时间】:2013-02-08 05:14:36
【问题描述】:
我有一个使用 mongodb 工作角色的 Azure 云项目。在本地模拟器中运行时一切正常,但是当我部署到 Azure 暂存区时,mongodb 工作人员角色卡在循环中并显示 System.IO.FileNotFoundException。我远程连接到其中一台虚拟机,查看事件查看器,发现如下错误:
发生未处理的异常。类型:System.IO.FileNotFoundException 进程 ID:1936 进程名称:WaWorkerHost 线程 ID:4 AppDomain 角色 MongoDB.WindowsAzure.MongoDBRole_IN_0 的未处理异常 例外:无法加载文件或程序集'mswacdmi,版本 = 1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 或其之一 依赖关系。该系统找不到指定的文件。在 Microsoft.WindowsAzure.StorageClient.CloudDrive..ctor(Uri uri, StorageCredentials 凭据)在 Microsoft.WindowsAzure.StorageClient.CloudStorageAccountCloudDriveExtensions.CreateCloudDrive(CloudStorageAccount storageAccount,字符串 pageBlobUri)在 MongoDB.WindowsAzure.MongoDBRole.Utilities.GetMountedPathFromBlob(字符串 localCachePath,字符串 cloudDir,字符串 containerName,字符串 blobName, Int32 driveSize, CloudDrive& mongoDrive) 在 c:\Users\Matt\Software\AzurePrototype1\mongo-azure-master\src\MongoDB.WindowsAzure.MongoDBRole\Utilities.cs:line 78 在 MongoDB.WindowsAzure.MongoDBRole.MongoDBRole.GetMongoDataDirectory() 在 c:\Users\Matt\Software\AzurePrototype1\mongo-azure-master\src\MongoDB.WindowsAzure.MongoDBRole\MongoDBRole.cs: MongoDB.WindowsAzure.MongoDBRole.MongoDBRole.StartMongoD() 的第 255 行 在 c:\Users\Matt\Software\AzurePrototype1\mongo-azure-master\src\MongoDB.WindowsAzure.MongoDBRole\MongoDBRole.cs: MongoDB.WindowsAzure.MongoDBRole.MongoDBRole.OnStart() 的第 201 行 c:\Users\Matt\Software\AzurePrototype1\mongo-azure-master\src\MongoDB.WindowsAzure.MongoDBRole\MongoDBRole.cs:line 91 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType 角色类型枚举)在 Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b__0() 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext、ContextCallback 回调、对象状态、布尔值 ignoreSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext、ContextCallback 回调、对象状态)在 System.Threading.ThreadHelper.ThreadStart()
为什么这在本地工作而不是在 Azure 上工作?我对装配等不太了解,但我正在学习。网上建议的一件事是检查引用程序集的属性并将“复制本地”设置为true,我已经尝试过,但仍然是同样的错误。
【问题讨论】:
标签: mongodb azure azure-worker-roles azure-storage