我已经在Windows Azure中尝试了一些实验,效果还不错。因此,我开始使用Azure模拟器开发我的应用程序。
今天我在Windows Azure中进行了第一次部署测试,并遇到了第一个问题:
No connection could be made because the target machine actively refused it 127.0.0.1:10000
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.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:10000
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.
Stack Trace:
[SocketException (0x274d): No connection could be made because the target machine actively refused it 127.0.0.1:10000]
System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) +2724507
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +392
[WebException: Unable to connect to the remote server]
Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result() +96
Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait() +271
Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.Delete(BlobRequestOptions options) +213
MyProject.Web.MvcApplication.InitBlobs() in C:\Sites\MyProject\MyProject\MyProject.Web\Global.asax.cs:85
MyProject.Web.MvcApplication.Application_Start() in C:\Sites\MyProject\MyProject\MyProject.Web\Global.asax.cs:52
这是第一次部署,所以我试图删除一个不存在的容器。现在我处理了异常。
我重新部署了项目,没有收到任何服务器错误。它只是结束连接并留下这个错误:
Error 324 (net::ERR_EMPTY_RESPONSE)
我猜我在配置中漏掉了一些东西,但我无法找到确切的原因。谢谢你的帮助!
编辑: 这个部署本身是该应用程序的第一个部署,但它不是我在Windows Azure上执行的第一个部署。当我开始为Windows Azure开发时,我已经部署了一些msdn实验室。
HomeController
中,但没有任何变化。我已经检查了我的凭据。它们都是有效的,并与同一个帐户关联。我还尝试直接在global.asax
方法中放置我的连接字符串,而不是调用configuration manager
的键,但它不起作用。我无法理解的是,为什么应用程序尝试连接到127.0.0.1:10000
,而我正在使用 Windows Azure。 - Florent Henry