Azure开发者任务之一:解决Azure Storage Emulator初始化失败

时间:2023-03-09 02:56:55
Azure开发者任务之一:解决Azure Storage Emulator初始化失败

初学Windows Azure:

我打算开始学习Windows Azure。我安装了Azure SDK,然后在“Cloud”标签下选择Windows Azure模板,创建了一个项目,然后又创建了一个Web角色。

Azure开发者任务之一:解决Azure Storage Emulator初始化失败

Azure开发者任务之一:解决Azure Storage Emulator初始化失败

在aspx文件上,我只添加了一个标签,但是当我试图运行这个项目的时候,我得到了如下错误:

Azure开发者任务之一:解决Azure Storage Emulator初始化失败

当我切换到“Output”窗口的时候,我得到了错误信息:

Windows Azure Tools:初始化Windows Azure storage emulator失败。无法启动Development Storage。启动Development Storage失败:SQL Server实例‘localhost\SQLExpress’无法被找到。请使用Windows Azure SDK中的‘DSInit’实用程序为Development Storage配置一个SQL Server实例。

Azure开发者任务之一:解决Azure Storage Emulator初始化失败

要解决这个问题,用管理员模式打开命令提示符窗口:

Azure开发者任务之一:解决Azure Storage Emulator初始化失败

把当前目录切换到:C:\ProgramFiles\WindowsAzureSDK\v1.3\Bin\DevStore

Azure开发者任务之一:解决Azure Storage Emulator初始化失败

然后输入命令:

C:\Program Files\Windows azure SDK\v1.3\bin\devstore DSINIT /SQLINSTANCE:SQLTest /Forcecreate

在执行上面这个命令的过程中,只有两点需要注意一下:

SQLTEST:这是SQL Server实例的名字。一定要确保你在此处提供的是SQL Server实例的名字而不是你的PC的名字。

如果你没有提供有效的SQL Server实例名,你可能会得到下面这个异常:

Azure开发者任务之一:解决Azure Storage Emulator初始化失败

成功地执行这个命令以后,你会得到下面这个带有成功信息的对话框:

Azure开发者任务之一:解决Azure Storage Emulator初始化失败

原文名:Windows Azure for Developers Task 1: Resolving Failed to initialize Windows Azure storage emulator Error 作者: Dhananjaykumar