在 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 导入示例,那些得到完全相同的错误!