使用Backload进行文件上载,在已发布的ASP.NET MVC4应用程序上获取异常

时间:2013-09-04 13:52:27

标签: c# asp.net asp.net-mvc-4

在Visual Studio中工作并测试我的应用程序时,一切正常。我正在使用Backload将文件上传到服务器。但是,在发布到本地IIS服务器时尝试上载文件时,出现以下异常:

算术运算导致溢出。

完整的堆栈跟踪如下:

[OverflowException: Arithmetic operation resulted in an overflow.]
   System.IntPtr.op_Explicit(IntPtr value) +37
   筦屎긑쾖㨚�䓝�.敕蛘᷏ꂫ�۟똿뽎() +2030
   .cctor() +115

[TypeInitializationException: The type initializer for '<Module>' threw an exception.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +159
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +256
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +127
   System.Activator.CreateInstance(Type type) +11
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +92

[InvalidOperationException: An error occurred when trying to create a controller of type 'Backload.Controllers.BackloadController'. Make sure that the controller has a parameterless public constructor.]
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +256
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +81
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +270
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +86
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +12550671
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

IIS服务器具有写入上传文件夹的所有权限。尝试访问localhost / mySite / Backload / UploadHandler

上的后载时发生此错误

使用的Backload版本是1.9.2.2(是的,我得到那些中国/日本标志,不知道为什么)

编辑:刚尝试从github导入示例,那些得到完全相同的错误!

1 个答案:

答案 0 :(得分:0)

这与问题#17有关,将在即将发布的1.9.3中修复。 请在此处阅读:https://github.com/blackcity/Backload/issues/17

编辑: 刚刚看到,Nuget上有1.9.3版本的候选版本。您应该检查此版本,如果异常仍然存在,请通知开发人员。他们通常会尝试非常快速地修复错误。 http://www.nuget.org/packages/Backload/