我運行Windows Server 2012 R2關閉,剛剛從Windows 2008radgrid控件BIFF出口 - 一個現有的連接被強行遠程主機
升級我有一個Telerik
網格圖像。我最近更換了服務器,現在我無法將網格導出爲與圖像相匹配。錯誤如下:
An existing connection was forcibly closed by the remote host
堆棧跟蹤:
[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +249
[IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +8420333
System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) +57
System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +243
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +470
System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +8552078
System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +230
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +645
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +9
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +87
System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +1467
System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +84
System.Net.ConnectStream.WriteHeaders(Boolean async) +816
[WebException: The underlying connection was closed: An unexpected error occurred on a send.]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +3407972
System.Net.WebClient.DownloadData(Uri address) +214
Telerik.Web.UI.ExportInfrastructure.Image.GetImageFromUrl() +226
Telerik.Web.UI.ExportInfrastructure.XlsBiffRenderer.CreateWorksheet(Table tbl, Workbook wb) +2238
Telerik.Web.UI.ExportInfrastructure.XlsBiffRenderer.Render() +198
Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderForm(HtmlTextWriter nullWriter, Control form) +1057
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +151
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5363
這是一個動態創建的網格,並用它在舊服務器上運行。
我已經把它縮小到下面的代碼當然。當我包含完整的URL(這是一個生成圖像的ashx)時,它會失敗。當我排除「https://www.someserver.com」時,它可以正常工作,但不會以BIFF格式導出圖像。
GridImageColumn gci = new GridImageColumn();
gridPreview.MasterTableView.Columns.Add(gci);
gci.HeaderText = fieldName;
gci.UniqueName = fieldName.Replace(" ", string.Empty);
gci.FooterText = "image";
gci.DataImageUrlFormatString = string.Format("https://www.someserver.com/{0}{{0}}/w100/h100", cm.SiteInfo.FriendlyName);
gci.DataImageUrlFields = new string[] { fieldName };
gci.ImageWidth = 100;
gci.ItemStyle.Width = 100;
gci.HeaderStyle.Width = 100;
gci.AllowFiltering = false;
我已經花了一整天的時間拉我的頭髮就這一個,我需要一個快速的答案來解決這個問題...有沒有在IIS 8的服務器設置我需要保持回調從失敗的形象?這是一個權限問題,當代碼調用生成的圖像時,它無法訪問圖像(聽起來很荒謬,但我現在抓住了吸管)。
我試過增加超時時間(我懷疑是無濟於事,因爲它很快失敗)。我運行了一個調試會話,它在預渲染上崩潰了。使用JustDecompile挖掘Telerik,我發現它在prerender上做了它的工作,但我想我正在追逐我的尾巴以尋找我失蹤的東西。畢竟,如果它在一臺服務器上工作,它應該在我移動到的那臺服務器上工作?
它在標準Excel導出上效果很好,但是當然,圖像不會嵌入。
編輯︰我重新激活舊服務器使用舊的數據庫(圖像仍然從新的服務器拉),並失敗了同樣的事情。這就排除了一切,除了Telerik從新服務器上獲取圖像的方式。我可能會返回,編輯包括圖像在內的所有內容,以查看錯誤是否更改。
再次編輯:好吧,我改變了舊服務器上的所有內容,停止錯誤的一件事是將圖像URL更改爲舊服務器上的本地URL。所以 - 這意味着絕對與抓取新服務器上的圖像有關。 Soooo - 有什麼區別?是DDOS保護嗎?它是權限嗎? (編輯:不,這不是 - 我用了一個大寫字母「讀/寫」,同樣的問題)這讓我瘋狂。