创建Windows Azure应用中遇到的一些问题

本文涉及的产品
云数据库 RDS SQL Server,独享型 2核4GB
简介:


距离上次看Windows Azure有一段时间了,今天在用VS2010创建Windows Azure时出现了不少问题,这里做个记录。

首先是创建好Windows Azure模版项目,启动调试时Windows Azure存储模拟器初始化失败,错误信息为:

Failed to initialize Windows Azure storage emulator.

image

其实按照错误信息中的提示,查看output窗口,信息如下:

output window:

Windows Azure Tools: Failed to initialize Windows Azure storage emulator. Unable to start Development Storage. Failed to start Storage Emulator: the SQL Server instance ‘localhost\SQLExpress’ could not be found.   Please configure the SQL Server instance for Storage Emulator using the ‘DSInit’ utility in the Windows Azure SDK.

这个Windows Azure存储模拟器需要本地的Sql Express,我平时为了节省资源把Sql Server服务全部都停掉了。但发现启动服务后还是有问题,于是按照错误信息中的提示,运行一下DSInit命令还重新初始化存储模拟器:

在Visual Studio Command Prompt (2010)命令行工具中输入:

cd C:\Program Files\Windows Azure Emulator\emulator\devstore

DSInit /forcecreate

执行结果如下,初始化成功。

image

 

然后启动调试,前面的错误信息消失。

这是如果用Sql Server management studio打开Sql Express,会发现其中有个一个数据库DevelopmentStorageDb20110816,如图:

image

但是页面并未运行正常,而是出现如下错误信息:

Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

放狗搜了一下,找到http://support.microsoft.com/kb/2015129中解释了原因和解决办法。也许我在安装好.net framework 4.0后,因为某些原因有安装了更低版本的.net框架。解决办法就是用asp.net 4.0重新注册IIS:

cmd窗口中运行

aspnet_regiis.exe /iru

aspnet_regiis位于如下位置:

%windir%\Microsoft.NET\Framework\v4.0.30319

%windir%\Microsoft.NET\Framework64\v4.0.30319 (64位)

 

到此环境又恢复了正常。

作者: 峻祁连
邮箱:junqilian@163.com 
出处: http://junqilian.cnblogs.com 
转载请保留此信息。




本文转自峻祁连. Moving to Cloud/Mobile博客园博客,原文链接:http://www.cnblogs.com/junqilian/archive/2012/03/26/2415964.html ,如需转载请自行联系原作者
相关实践学习
使用SQL语句管理索引
本次实验主要介绍如何在RDS-SQLServer数据库中,使用SQL语句管理索引。
SQL Server on Linux入门教程
SQL Server数据库一直只提供Windows下的版本。2016年微软宣布推出可运行在Linux系统下的SQL Server数据库,该版本目前还是早期预览版本。本课程主要介绍SQLServer On Linux的基本知识。 相关的阿里云产品:云数据库RDS SQL Server版 RDS SQL Server不仅拥有高可用架构和任意时间点的数据恢复功能,强力支撑各种企业应用,同时也包含了微软的License费用,减少额外支出。 了解产品详情: https://www.aliyun.com/product/rds/sqlserver
相关文章
|
5月前
|
应用服务中间件 nginx Windows
windows下DOS命令杀掉Nginx应用进程
windows下DOS命令杀掉Nginx应用进程
|
3月前
|
API Python Windows
python3应用windows api对后台程序窗口及桌面截图并保存的方法
python3应用windows api对后台程序窗口及桌面截图并保存的方法
89 1
|
1月前
|
数据可视化 数据库 C++
Qt 5.14.2揭秘高效开发:如何用VS2022快速部署Qt 5.14.2,打造无与伦比的Windows应用
Qt 5.14.2揭秘高效开发:如何用VS2022快速部署Qt 5.14.2,打造无与伦比的Windows应用
|
2月前
|
安全 Linux iOS开发
上传 iOS 应用变得更加容易 - 在 Windows 上架 iOS APP 的工具介绍
上传 iOS 应用变得更加容易 - 在 Windows 上架 iOS APP 的工具介绍
|
3月前
|
存储 Kubernetes 安全
虚拟机测试Windows Server 2016原地升级2019,应用和数据完美保留
Windows Server 2016可以无缝升级到2019版本,确保应用程序和数据在原地升级过程中完整保留。
102 0
|
3月前
|
Linux iOS开发 Windows
windows 如何上架 ios 应用到 app store
windows 如何上架 ios 应用到 app store
|
3月前
|
消息中间件 Java Kafka
windows下kafka的环境配置及rdkafka库的应用
windows下kafka的环境配置及rdkafka库的应用
|
8月前
|
开发工具 git Windows
太阳当空照-Windows服务化方式NSSM应用
太阳当空照-Windows服务化方式NSSM应用
122 0
|
4月前
|
C# Windows
C#安装“Windows 窗体应用(.NET Framework)”
C#安装“Windows 窗体应用(.NET Framework)”
50 0
|
5月前
|
TensorFlow 算法框架/工具 异构计算
YOLO实践应用之搭建开发环境(Windows系统、Python 3.8、TensorFlow2.3版本)
基于YOLO进行物体检测、对象识别,先和大家分享如何搭建开发环境,会分为CPU版本、GPU版本的两种开发环境,本文会分别详细地介绍搭建环境的过程。主要使用TensorFlow2.3、opencv-python4.4.0、Pillow、matplotlib 等依赖库。
97 0