Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 650 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server."

#1
I have couple of update panels and jquery tabs on page. And also I am loading couple user controls on update panels. After user waited for couple of minutes (not checked the time approx 40 mins). when user send request from submit button it is giving below error?

'Sys.WebForms.PageRequestManagerServerErrorException:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown
error occurred while processing the request on the server. The status
code returned from the server was: 0' when calling method:
[nsIDOMEventListener::handleEvent]

I am not able trace this issue to fix. But I am sure. This is causing by Ajax. Gurus, if you knows solution. Please let me know.

Reply

#2
Brother this piece of code is not a solution just change it to

<script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args){
if (args.get_error() != undefined){
**alert(args.get_error().message.substr(args.get_error().name.length + 2));**
args.set_errorHandled(true);
}
}
</script>


and you will see the error is there but you are just not throwing it on UI.
Reply

#3
Use the following code below inside updatepanel.



<script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args){
if (args.get_error() != undefined){
args.set_errorHandled(true);
}
}
</script>


Reply

#4
For me the problem was that I was using a `<button>` instead of a `<asp:LinkButton>`
Reply

#5
I got this error when I had my button in the GridView in an UpdatePanel... deubbing my code I found that the above error is caused because of another internal error "A potentially dangerous Request.Form value was detected from the client"

Finally I figured out that one of my TextBoxes on the page has XML/HTML content and this in-turn causing above error
when I removed the xml/HTML and tested the button click ... it worked as expected.
Reply

#6
Some times due to some code you get HTML tags in a text filed, like I was replacing some characters with new line BR tag of HTML and by mistake I also replaced it in the text that was supposed to be displayed in a Multiline text box so my multiline text box had a new line HTML tag BR in it coming dynamically due to my string replace function and I started getting this JavaScript error and as this HTML code was displayed in a text box that was in an update panel I start getting this error so I made the correction and all was fine. So before copying pasting anything please look at your code and see that all tag are closed proper and no irrelevant code data is coming to text boxes or Drop down lists. This error always come due to ill formed tags and irrelevant data.
Reply

#7
My fix for this was to remove any HTML markup that was in the Text="" property of a TextBox in my asp.net code, inside an update panel. If you have more than one update panel on a page, it will affect them all, which makes it harder to work out which panel has the issue. Chris's answer above lead me to find this, but his is a very hidden answer but I think a very relevant one so here is an answer explained.

<asp:TextBox ID="bookingTBox" runat="server" ToolTip="" Width="150px" Text="<Auto Assigned>" CssClass="textboxItalicFormat"></asp:TextBox>

The above code will give this error.

The below will not.

<asp:TextBox ID="bookingTBox" runat="server" ToolTip="" Width="150px" Text="Auto Assigned" CssClass="textboxItalicFormat"></asp:TextBox>


In the second textbox code I have removed the < and > from the Text="" property. Please try this before spending time adding lines of script code, etc.

Reply

#8
Had this problem when using AsyncFileUploader in an iFrame. Error came when using firefox. Worked in chrome just fine. It seemed like either the parent page or iframe page was loading out of sync and the parent page could not find the controls on the iframe page. Added a simple javascript alert to say that the file was uploaded. This gave the controls enough time to load and since the controls were available, everything loaded without an error.
Reply

#9
I had the same issue, when i was trying out a way to solve it, i found out that the update panel was causing this issue. Depending on my requirement i could remove the update panel and get rid of the issue.
So it's a possible solution for the issue.
Reply

#10
I had this issue when I upgraded my project to 4.5 framework and the `GridView` had Empty Data Template. Something changed and the following statement which previously was returning the Empty Data Template was now returning the Header Row.

GridViewRow dr = (GridViewRow)this.grdViewRoleMembership.Controls[0].Controls[0];

I changed it to below and the error went away and the GridView started working as expected.

GridViewRow dr = (GridViewRow)this.grdViewRoleMembership.Controls[0].Controls[1];

I hope this helps someone.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through