Some time has elapsed since I last viewed Windows Azure. Today, many problems have occurred when I used VS2010 to create Windows Azure. Here I will make a record.
The first step is to create a Windows Azure template project. When debugging is started, the initialization of the Windows Azure storage simulator fails. The error message is:
Failed to initialize Windows Azure storage emulator.
In fact, follow the prompts in the error message to view the output window. The information is as follows:
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.
This Windows Azure storage simulator requires local SQL Express. I usually stop all SQL Server services to save resources. However, the problem persists after the service is started. Therefore, follow the prompts in the error message to run the DSInit command and re-initialize the storage simulator:
In Visual Studio Command Prompt (2010) Command line tool, enter:
Cd C: \ Program Files \ Windows Azure Emulator \ emulator \ devstore
DSInit/forcecreate
The execution result is as follows. Initialization is successful.
Start debugging and the preceding error message disappears.
If you use SQL Server management studio to open SQL Express, you will find that one of the databases is developmentstoragedb20151120.16,
However, the page does not run normally, but the following error message is displayed:
Cocould 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: cocould 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.
Find
Http://support.microsoft.com/kb/2015129explain the cause and resolution method. After installing. net framework 4.0, I may have installed a later version of. net framework for some reasons. The solution is to re-register IIS with asp.net 4.0:
Run in cmd window
Aspnet_regiis.exe/iru
The position of aspnet_regiis is as follows:
% Windir % \ Microsoft. NET \ Framework \ v4.0.30319
% Windir % \ Microsoft. NET \ Framework64 \ v4.0.30319 (64-bit)
Now the environment is back to normal.