Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net VB中的Windows Azure存储:未在托管服务或开发结构中运行_Asp.net_Vb.net_Azure_Azure Storage - Fatal编程技术网

Asp.net VB中的Windows Azure存储:未在托管服务或开发结构中运行

Asp.net VB中的Windows Azure存储:未在托管服务或开发结构中运行,asp.net,vb.net,azure,azure-storage,Asp.net,Vb.net,Azure,Azure Storage,我正在尝试在Azure Visual Studio 2010开发环境中运行Azure Blob存储的实例,但不断出现以下错误: System.InvalidOperationException: Not running in a hosted service or the Development Fabric. 堆栈跟踪指向以下几行: Imports Microsoft.WindowsAzure Imports Microsoft.WindowsAzure.Diagnostics Import

我正在尝试在Azure Visual Studio 2010开发环境中运行Azure Blob存储的实例,但不断出现以下错误:

System.InvalidOperationException: Not running in a hosted service or the Development Fabric.
堆栈跟踪指向以下几行:

Imports Microsoft.WindowsAzure
Imports Microsoft.WindowsAzure.Diagnostics
Imports Microsoft.WindowsAzure.StorageClient

...

CloudStorageAccount.SetConfigurationSettingPublisher(Function(configName, configSetter) configSetter(ConfigurationManager.AppSettings(configName)))

Dim this_storage_account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString")

...
我对第一行有点怀疑,因为它来自一个c#解释器输出,这似乎是绕过CloudStorageAccount类怪癖的常见黑客

DataConnectionString设置为UseDevelopmentStorage=true

开发结构和开发存储都在任务栏中运行

我试图创建一个干净的解决方案,看看这是否是一个配置问题,但仍然得到相同的错误


任何想法都受到了感激

这对我来说是非常密集的。我相信这是因为我是通过VisualStudio服务器而不是开发结构来运行WebRole的。因此,它找不到存储服务

对于以下内容:


在浏览器中查看您的web角色时,您应该注意,与Azure关联的功能(除了简单的web浏览器)将不可用,除非您通过调试器(F5)运行它们。

当我遇到此错误消息时,它是由过时的服务部署(前一天)引起的这似乎只是部分关闭-新启动的应用程序具有不同的端口号。这个应用程序是用C#编写的,但我很确定这不是一个与语言相关的问题


只需使用Compute Emulator UI或“csrun/devfabric:shutdown”删除旧进程即可解决此问题。

堆栈跟踪的其余部分是什么?您不需要运行调试器。但是您确实需要将您的云项目设置为启动项目,而不是标准的web应用程序。我今天也有同样的问题。您需要将云项目设置为启动,并以管理员权限运行VS12(以管理员身份运行)