错误0x800703e3服务器传输文件,异常(消息):远程主机关闭了连接。错误代码是0x800703E3...

我在我的应用程序中收到此错误。我在错误日志中经常看到这些错误,但我不确定源代码。 以下是错误的堆栈跟踪。异常(消息):远程主机关闭了连接。错误代码是0x800703E3

Exception (Stack): at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)

at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()

at System.Web.HttpResponse.Flush(Boolean finalFlush)

at System.Web.Mvc.FileContentResult.WriteFile(HttpResponseBase response)

at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.b__17()

at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)

at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)

at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)

但做了一些谷歌上搜索我发现,原因可能是我下载文件的方式,但我不知道之后。这里也是源代码。

string Id = id.Split(new[] { '!' }).First();

DocumentInfo Content = Doc.ContentDownLoad(Settings, docId);

Response.Clear();

Response.BufferOutput = false;

fileName = Content.DocName + "." + Content.FileExtn;

Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName);

return File(Content.Content, Content.MimeType);

我在这里尝试了一些建议的解决方案,但没有任何工作。有人可以提出一个可行的解我在这里做错了什么?

2014-02-28

Sri

+0

你能详细说明你试过的吗? –

+0

我之前和之后使用的视图开始使用FileResult,然后我尝试使用Response.Flush()但静静地获取错误 –

+0

这是一个公共服务器? –

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值