ASP.NET MVC3 HttpStatusCodeResult StatusDescription – 指定
发布时间:2020-12-15 19:39:05 所属栏目:asp.Net 来源:网络整理
导读:由于某些原因我有一个错误尝试返回 新的HttpStatusCodeResult(500,statusDescription); 在我的MVC3应用程序它带来了错误 Specified argument was out of the range of valid values.Parameter name: valueDescription: An unhandled exception occurred duri
由于某些原因我有一个错误尝试返回
新的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 – 我们可以用IIS运行Selenium WebDriver测试用例,
- asp.net-mvc – 即使我设置CustomError =“On”,自定义错误
- asp.net-mvc – 如何使用带有IEnumerable的Html.CheckBox(l
- asp.net-mvc – Visual Studio 2013无法打开Razor视图 – ‘
- 坚石诚信ETz201应用于ASP.NET项目中
- asp.net-mvc – ViewBag和ViewData也是asp.net mvc中状态管
- asp.net-mvc – 如何从ASP.Net MVC列表页面使用jQuery UI模
- asp.net-mvc – ASP.net MVC数据注释DateTime默认值
- asp.net – 如何在一个新的选项卡中打开asp:HyperLink.Nav
- ASP.NET MVC中存在“帐户激活”工作流
推荐文章
站长推荐
- asp.net-mvc – 如何实现基于信誉的用户权限,如S
- asp.net-mvc-3 – asp.net中的pageBaseType mvc3
- asp.net-mvc – MVC中Ninject的适当存储库LifeCy
- asp.net – jquery getJson没有将任何值传递给控
- ASP.NET:如何更改每行中使用的itemTemplate?
- asp.net – Mono和IHttpHandler
- 经典的asp字符编码
- asp.net-mvc – 如何在ASP.NET MVC中将多个对象传
- asp.net-mvc – ASP.NET核心映射到静态文件处理程
- ASP.NET Core 配置 EF 框架服务 - ASP.NET Core
热点阅读