azure - 在 Azure 模拟器上运行 WebJobs

标签 azure azure-storage azure-webjobs azure-emulator

我正在尝试使用 Azure 模拟器让 Webjobs 在本地运行,但它生成了异常。我只发现旧帖子(从 2015 年初开始)说,由于某些不受支持的 Blob 功能,Azure 模拟器不支持本地执行。我想知道这个限制是否仍然有效或者是否存在一些解决方法?

在本地运行时,我将 JobHostConfiguration 创建为:

JobHostConfiguration config = new JobHostConfiguration();
config.StorageConnectionString =  "UseDevelopmentStorage=true";   
config.DashboardConnectionString = "UseDevelopmentStorage=true";

初始化后出现以下异常:

Unhandled Exception: System.InvalidOperationException: 
Failed to validate    Microsoft Azure WebJobs SDK Storage account.

知道如何让 WebJobs 在本地执行吗?有什么已知的解决方法吗?提前致谢。

最佳答案

I wonder if this limitation is still valid or if there exists some workaround?

简短的回答是肯定的。如果您想使用 Webjobs,则需要与有效的存储帐户进行交互。

但这并不意味着您不能在本地执行它们。您始终可以停止在云中运行的 Web 作业并从您的计算机运行相同的 Web 作业。

关于azure - 在 Azure 模拟器上运行 WebJobs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31157003/

相关文章:

python - 我无法使用本地 Python 脚本中的矢量填充 Azure 上托管的 Redis Enterprise 矢量数据库

bash - 如何将Azure Pipelines的工件发布到存储库的主分支中?

powershell - New-AzureRmEventHub 在 PowerShell 中给出错误

Azure 数据工厂架构,包含 Azure SQL 数据库到 Power BI

azure - 如何按计划重新启动 Azure Web App

azure - 是否可以在azure webjob部署期间注册一些COM组件?

azure - 我可以将什么样的应用程序部署到 Windows Azure

azure - 使用 AppendTextAsync 追加到 Azure Append Blob 会导致数据丢失

azure - 将所有数据从我的帐户转移到同一 Azure 订阅中的另一个帐户

azure - 为什么需要在 Azure 管理门户中而不是在 Web 作业的 App.config 中配置 Web 作业的连接字符串?