什么是使用Azure存储模拟器与Webjob连接字符串? [英] What is the connection string to use Azure Storage Emulator with a Webjob?

查看:152
本文介绍了什么是使用Azure存储模拟器与Webjob连接字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单WebJob,我希望与Azure存储模拟器来测试。

I have a simple WebJob which I wish to test with the Azure Storage Emulator.

目前,我已经设置了AzureJobsRuntime和AzureJobsData集使用的开发存储如下:

I currently have set the AzureJobsRuntime and AzureJobsData set to use development storage as follows:

<connectionStrings>
    <add name="AzureJobsRuntime" connectionString="UseDevelopmentStorage=true;" />
    <add name="AzureJobsData" connectionString="UseDevelopmentStorage=true;" />
</connectionStrings>

该webjob是很简单的:

The webjob is very simple:

public static void Main(string[] args)
{
    JobHost host = new JobHost();
    host.RunAndBlock();
}

public static void Process([QueueInput("queue")] string input, [BlobOutput("containername/blobname")]TextWriter writer)
{

}

这抛出异常的启动:

出现InvalidOperationException:

InvalidOperationException:

的Windows Azure存储帐户连接字符串的格式不正确。

Windows Azure Storage account connection string is not formatted correctly

我已经能够创建队列,并使用相同的连接字符串和 CloudStorageAccount 类从添加一个网站消息吧。

I have been able to create the queue and add messages to it from a website using the same connection string and the CloudStorageAccount class.

推荐答案

不幸的是,WebJobs SDK不支持使用Azure存储仿真器,因为它使用不受此仿真器支持的一些功能。

Unfortunately the WebJobs SDK does not support using Azure storage emulator as some features it uses are not supported by this emulator.

这篇关于什么是使用Azure存储模拟器与Webjob连接字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆