gpt4 book ai didi

logging - Azure - 无法部署 -Windows Azure 无法在服务包中找到资源 MyCustomLogs

转载 作者:行者123 更新时间:2023-12-02 12:18:11 25 4
gpt4 key购买 nike

我添加了以下几行,以便默认存储帐户的自定义日志记录显示在默认 WebLogs 表中,

LocalResource localResource = RoleEnvironment.GetLocalResource("MyCustomLogs");
DirectoryConfiguration dirConfig = new DirectoryConfiguration();
dirConfig.Container = "wad-mycustomlogs-container";
dirConfig.DirectoryQuotaInMB = localResource.MaximumSizeInMegabytes;
dirConfig.Path = localResource.RootPath;

产生错误:

Management URL 'https://management.core.windows.net/'...
12:01:03 AM - Connecting...
12:01:03 AM - Verifying storage account 'storagetaxiarmy'...
12:01:07 AM - Uploading Package...
12:01:34 AM - Updating...
12:02:23 AM - Windows Azure could not find the resource MyCustomLogs in the service package. You will need to add the resource back or do a full new deployment instead of upgrading an existing deployment.
12:02:23 AM - Deployment failed with a fatal error

为什么会发生这种情况以及如何防止这种情况发生,因为重新部署需要更改 VIP 地址,这是 Not Acceptable 。谢谢

最佳答案

添加

< LocalStorage name="MyCustomLogs" cleanOnRoleRecycle="false" / >

在您的 ServiceDefinition.csdef 中

关于logging - Azure - 无法部署 -Windows Azure 无法在服务包中找到资源 MyCustomLogs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14086390/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com