Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ASP.NET MVC删除了大量文件上载_Asp.net_Asp.net Mvc 3_Iis 7.5 - Fatal编程技术网

ASP.NET MVC删除了大量文件上载

ASP.NET MVC删除了大量文件上载,asp.net,asp.net-mvc-3,iis-7.5,Asp.net,Asp.net Mvc 3,Iis 7.5,我们在Windows 2008上托管ASP.NET MVC应用程序IIS 7.5,3核CPU(所有使用率~60%)和2GB RAM。web应用程序的w3wp.exe显示任务管理器中内存使用的~70000k。物理内存信息总计2043个,缓存600个,可用611个,可用20个 该web应用程序每分钟接受大量文件上载。大约每分钟20个文件。文件大小范围从100kb到10mb不等。我们注意到许多文件上传被丢弃。在查看HTTP请求信息时,我们发现内容长度和TotalBytes值是不同的 maxReques

我们在
Windows 2008
上托管
ASP.NET MVC应用程序
IIS 7.5
3核CPU(所有使用率~60%)和2GB RAM
。web应用程序的
w3wp.exe
显示任务管理器中内存使用的
~70000k
。物理内存信息总计2043个,缓存600个,可用611个,可用20个

该web应用程序每分钟接受大量文件上载。大约每分钟20个文件。文件大小范围从100kb到10mb不等。我们注意到许多文件上传被丢弃。在查看HTTP请求信息时,我们发现内容长度和TotalBytes值是不同的

maxRequestLength设置为81920,executionTimeout设置为1200

<httpRuntime targetFramework="4.5" maxRequestLength="81920" executionTimeout="1200" />
并在ASP.NET中获得如下错误

[HttpPost]
public ActionResult UploadFile(IEnumerable<HttpPostedFileBase> clientUpload, [OptionModelBinder]IOptionViewModel formData)
{
//...
}
System.ArgumentNullException: Value cannot be null.
Parameter name: name
   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at PC.Controllers.OptionModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
   at System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor)
   at System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__1e(AsyncCallback asyncCallback, Object asyncState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag)
   at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__17(AsyncCallback asyncCallback, Object asyncState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
   at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag)
   at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
   at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag)
   at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
System.ArgumentNullException:值不能为null。
参数名称:name
在System.Reflection.RuntimeAssembly.GetType(字符串名称、布尔throwOnError、布尔ignoreCase)
位于System.Reflection.Assembly.CreateInstance(字符串类型名、布尔ignoreCase、BindingFlags bindingAttr、Binder Binder、对象[]args、CultureInfo区域性、对象[]ActivationAttribute)
在PC.Controllers.OptionModelBinder.BindModel(ControllerContext ControllerContext,ModelBindingContext bindingContext)
位于System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext ControllerContext,ParameterDescriptor ParameterDescriptor)
位于System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext ControllerContext,ActionDescriptor ActionDescriptor)
在System.Web.Mvc.Async.AsyncControllerActionInvoker.c_uuDisplayClass25.b_u1E(AsyncCallback AsyncCallback,Object asyncState)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记)
在System.Web.Mvc.Controller.c__displayClassId.b_uu 17(AsyncCallback AsyncCallback,Object asyncState)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
位于System.Web.Mvc.Controller.BeginExecuteCore(异步回调,对象状态)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin(异步回调、对象状态、BeginInvokeDelegate beginDelegate、EndInvokeDelegate endDelegate、对象标记)
位于System.Web.Mvc.Controller.BeginExecute(RequestContext RequestContext、AsyncCallback回调、对象状态)
在System.Web.Mvc.MvcHandler.c_uuudisplayClass8.b_uuu2(AsyncCallback AsyncCallback,Object asyncState)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin(异步回调、对象状态、BeginInvokeDelegate beginDelegate、EndInvokeDelegate endDelegate、对象标记)
位于System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext、AsyncCallback回调、对象状态)
在System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()中
在System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值&同步完成)
自定义活页夹接收请求,但部分上载数据,因为内容长度和TotalBytes不匹配


也许有人知道问题出在哪里,从哪里开始查找?

您已经设置了maxRequestLength=“81920”,即80MB。您已经提到,大请求的范围可能达到100 mb,而且内容长度和总字节数也不同。请检查是否只有那些请求未通过那些超出大小限制的请求。如果是,请增加maxRequestLength。

eventviewer中是否有任何错误???应用程序池的队列长度是多少??应用程序池/请求的超时和时间限制???添加了更多信息。maxRequestLength设置为80mb,但失败的文件小得多,如300kb或2mb。未超过maxRequestLength的多个请求失败。