Windows Azure 项目笔记#1


Windows Azure 项目笔记#1
2011年05月06日
  刚完成自己的第一个Windows Azure + Silverlight项目的phase 01,回头来看,经历不少曲折,现一一记录,作为备忘。
  1。异常信息"SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used"
  问题:上手这个项目时,还没来的及系统学习最新的Windows Azure Training Kit , 需求中用到了Blob Storage Service, 搜索到的示例代码运行时遇到异常 SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used。问题源自SDK1.3以来的一些breaking changes (目前最新的sdk为1.4)。 
  解决:来自msdn的一篇blog
  2. Storage 模拟器无法启动问题:
  Windows Azure SDK提供了模拟器可供在开发机上调试,Storage 服务同样也有一个Storage模拟器,启动VS调试Cloud项目时会自动启动该模拟器。
  问题:模拟器无法启动,VS Output窗口信息如下:
  Windows Azure Tools: Failed to initialize Windows Azure storage emulator. Unable to start Development Storage. Failed to start Development Storage: the SQL Server instance 'localhost\SQLExpress' could not be found.   Please configure the SQL Server instance for Development Storage using the 'DSInit' utility in the Windows Azure SDK.
  
  原来Storage模拟器默认需要SQLExpress实例。我的开发机上没有SQLExpress,而是安装了SQL 2008R2,实例名为默认名称MSSqlserver。
  解决:
  Windows Azure SDK提供了一个工具DSInit.exe (C:\Program Files\Windows Azure SDK\v1.4\bin\devstore), 可用于配制Storage模拟器的数据库。直接运行,配置失败:
  
  搜索到msdn论坛中的的一篇帖子,提到了DSInit的命令行及参数使用,使用如下命令,配置成功:
  
  3. Blob Storage Service中的container有一些命名限制,其中一条是必须为小写
  4. Windows Azure Tools for VS提供了一个Storage 浏览器
  

猜你喜欢

转载自qviwp23e.iteye.com/blog/1362935