我得到了很多錯誤,像No connection could be made because the target machine actively refused it 70.37.127.112:443
Azure的表存儲,如何避免連接錯誤(我試過重試)
所以我添加Microsoft.Practices.TransientFaultHandling
重試。
但儘管如此,許多錯誤(甚至重試後)
的我想知道:
1,由於Azure是一個分佈式服務,爲什麼我總是達到70.37.127.112(我訪問存儲通過簡單原件DefaultEndpointsProtocol=https;AccountName=storage_account;.....,
然後使用tableContext.CreateQuery<datatype>("table_name");
)。我注意到我的所有表(即使在不同的存儲帳戶)都達到了70.37.127.112。我的問題是否有改變它的方法?
2,如何完全消除上面的錯誤?
錯誤的詳細信息
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 70.37.127.112:443
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at System.Data.Services.Client.QueryResult.Execute()
at System.Data.Services.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
at System.Data.Services.Client.DataServiceQuery`1.Execute()
at System.Data.Services.Client.DataServiceQuery`1.GetEnumerator()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
大多數請求都很好,所以我認爲這不是防火牆問題(並且部署在Azure上,所以我現在不接觸防火牆)。我也用一些表的http,相同的錯誤。我會向他們提交一張票,謝謝你的建議。 – 2012-03-25 12:54:49
我想你可能會混淆SQL Azure的主服務器和2複製備份在這裏爲什麼存儲服務器。存儲服務並不像那樣(即「主」這個術語在這裏並不適用)。有分區服務器,分區大師等。總之,而不是我嘗試在評論中解釋,請觀看布拉德:http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-961T – dunnry 2012-03-25 14:16:26
謝謝你指出,dunnry。當然,3次複製的是數據,而不是爲請求提供服務的計算服務器。我會更新答案。 – 2012-03-25 16:52:41