ASP.NET MVC3 HttpStatusCodeResult StatusDescription – 指定的参数超
发布时间:2020-05-23 03:32:51 所属栏目:asp.Net 来源:互联网
导读:由于某些原因我有一个错误尝试返回 新的HttpStatusCodeResult(500,statusDescription); 在我的MVC3应用程序它带来了错误 Specified argument was out of the range of valid values.Parameter name: valueDescription: An unhandled exception occ
|
由于某些原因我有一个错误尝试返回 新的HttpStatusCodeResult(500,statusDescription); 在我的MVC3应用程序它带来了错误 Specified argument was out of the range of valid values. Parameter name: value Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: value Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: value] System.Web.HttpResponse.set_StatusDescription(String value) +4877926 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext,String actionName) +785441 System.Web.Mvc.Controller.ExecuteCore() +159 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335 System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20 System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +54 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +453 System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) +371 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.372 如果我更改结果返回新的HttpStatusCodeResult(500,“statusDescription”); 它会工作正常,是否有某种长度限制状态描述? 解决方法看源码,or at the documentation,不能超过512个字符.(编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc-3 – MVC3 Ajax.ActionLink
- asp.net – 缓存特定的Javascript和CSS文件
- asp.net – 如何检查SQL Server代理是否正在运行
- asp.net-core-mvc – 如何考虑请求和响应范围标头流式传输视
- 记一道毫无思路的算法题
- asp.net-web-api – Web API / MVC 6中的安全JSON Web令牌
- asp.net-mvc-3 – 坚持使用asp.net mvc 3.0脚手架,以防多对
- asp.net – 在UpdatePanel asyncpostback后丢失的页面
- asp.net – MaintainScrollPositionOnPostback属性不适用于
- ViewState在ASP.NET MVC中是否相关?
推荐文章
站长推荐
- asp.net-mvc-3 – Asp.net mvc 3-获取当前控制器
- asp.net-mvc – 如何使用Windsor将依赖项注入到A
- asp.net – 新安装的IIS. Aspx页面不会显示
- asp.net-mvc-3 – 向Entity Framework数据库添加
- asp.net – Response.TrySkipIisCustomErrors不工
- asp.net – 如何测试开发机器上的子域? abc.loc
- asp.net – 指定的CGI应用程序遇到错误,服务器终
- asp.net-mvc – ASP.NET MVC 5为隐藏输入渲染不同
- asp.net-mvc – ASP.NET MVC的初学者在线资源是什
- asp.net – App.Config和Web.Config之间的区别?
热点阅读
