sys.webforms.pagerequestmanagerservererrorexception从服务器返回的状态代码是500

时间:2015-06-23 05:00:37

标签: asp.net vb.net visual-studio-2012 visual-studio-2008 configuration

当我点击按钮时,我想重定向到另一个页面(vb.net代码) 现在如果我在visual studio 8中使用我的代码,它工作得很好,但在visual studio 2012中,它会在下面的浏览器控件中出错,并且无法执行vb.code。

任何人都可以帮我解决这个问题。

POST http://localhost/TMS_WEB/frmEventSchedule.aspx?Mode=Planning 500 (Internal Server Error) ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5

Sys.Net.XMLHttpExecutor.executeRequest @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5
Sys.Net._WebRequestManager.executeRequest @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5
Sys.Net.WebRequest.invoke @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5
Sys.WebForms.PageRequestManager._onFormSubmit @ ScriptResource.axd?d=OYcYUsN1jrZ11Zo6YGMqv2SJ0gsCQ6FsMqwFuIK_fKjp9p80ufP_-7tIq7dZFAfrKRo4W90i_wzCoq…:5
(anonymous function) @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5
b @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5


XHR finished loading: POST "http://localhost/TMS_WEB/frmEventSchedule.aspx?Mode=Planning".
Sys.Net.XMLHttpExecutor.executeRequest @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5
Sys.Net._WebRequestManager.executeRequest @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5
Sys.Net.WebRequest.invoke @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5
Sys.WebForms.PageRequestManager._onFormSubmit @ ScriptResource.axd?d=OYcYUsN1jrZ11Zo6YGMqv2SJ0gsCQ6FsMqwFuIK_fKjp9p80ufP_-7tIq7dZFAfrKRo4W90i_wzCoq…:5 
(anonymous function) @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5
b @ ScriptResource.axd?d=lw0IPgH2mrygbq4_NoTZCpzyX-yoJHK8Nj5HjXTv0boIebChtGq3xm65yS8w0iAbkn8jzFKrmQahfY…:5

1 个答案:

答案 0 :(得分:0)

我查看了我的浏览器网络状态 它显示由于对象的当前状态,Operation无效。

[InvalidOperationException: Operation is not valid due to the current state of the object.]
   System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() +2693342
   System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +61
   System.Web.HttpRequest.FillInFormCollection() +148

搜索并找出

在我的web.config文件中

<appSettings>
    <add key="aspnet:MaxHttpCollectionKeys" value="2001" />
</appSettings>

更改此

<appSettings>
        <add key="aspnet:MaxHttpCollectionKeys" value="3001" />
</appSettings>

这解决了我的问题。

希望这会对某人有所帮助..