.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

WebForms.PageRequestManagerServerErrorException: Status code 500

Posted By:      Posted Date: October 06, 2010    Points: 0   Category :ASP.Net


I'm getting "Sys, WebForms.PageRequestManagerServerErrorException: an unknow error occured while processing the request on the server. the status code returned from the server was: 500".

I'm using a GridView and Button in an Update panel, and on click on the button i'm returning selected rows from the gridview which was throwing the above error in javascript popup. Specifically this error is coming only if I assign "DataKeysNames" property of the gird view. Otherwise, it is working fine.

Please help me how to resolve this error.

Thanks inadvance





View Complete Post

More Related Resource Links

SSRS 2008 error - Sys.WebForms.PageRequestManagerServerErrorException: status code 12029



I am executing a huge report in SSRS 2008, after some time the report doesn't renders and there is an error icon at the left bottom of the web page. When I click open it to see the details, it gives following error;

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while
processing the request on the server. The status code returned from the server was: 12029.

Any help on this will be appreciated.


Change the Workflow Status through code


HI Folks,

I have a scenario where i need to develop a 6 stage approval workflow(sequential) using WWF and depoly it to sharepoint. Everythigns fine till here.

Now we look ahead to change the Status field on the documents library which actually has the Workflow Name as the column name and its value being In Progress, depending on the stage of approval. Like(Approved 1, Approved 2, Approved 3.)

And if rejected the status should be rejected than Completed. Any idea how can we update this column of the List item.

I have tried item[workflowProperties.Workflow.ParentAssociation.Name]="Approved 1";

But this throws an error saying input string is not in a correct format.

Any information would be of great help :)


Sreeharsha Alagani

Sys.WebForms.PageRequestManagerServerErrorException: An unknown


I have written a web application that allows user to view crystal reports. When they select the report, application shows the parameters and when they enter parameters and click on OK, it processes the report and displays it on screen. My problem is, I added the AJAX Update panel with Updateprogress control. Now when users enter the parameters and click on Ok, it runs sometimes and then suddenly gives the following message:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

I have triple checked my project to make sure there are no Response.Write / server.tranfer commands. What I have is a label control and it displays any error in the try catch block. Now when I have the AJAX controls, if there is an error it does not even display the error on the label. It either refreshes the screen or show the above error. I googled and could not find a proper solution for this. Only option is to remove the AJAX control. I use VS2005.

The problem is when I run the same report 20 times, 2 or 3 times I get the above error.


Any help is greatly appreciated.

The status code returned from the server was: 500

  I am getting the following eroor , when using the UpdatePanel of Ajax Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server.The status code returned from the server was: 500 To my strange ,the error is thrown not all the time , only in some rare cases which could not be found out . I tried to increase the AsyncPostBackTimeout to 300 which was 60 but i could n't  get the error down  installing the ajax set up in server is must or not ?  We just placed the ajax dlls in the server. Please can anybody help me with right solution.   Regards G Suresh Kumar         

What is error Sys.Webforms.PageRequestManagerServerErrorException

I have a server button in an aspx page. On click of the button I am opening a new aspx page as follows:Protected Sub btnView_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnView.ClickDim script As String = "OnLoadComplete();window.open('ViewReport.aspx?id=" & requestId & "','mywindow','width=1000,height=675,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes,left=10,top=10');"ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "script1", script, True)       End Sub Sometimes not frequently when I click the button, I get an alert box with message as follows:Sys.Webforms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was : 500Please let me know why I am getting this error randomly and what is the solution to this.I guess there is some configuration issue as on one machine I am getting error, on other its working fine.ThanksVikas

i cannot access iis virtual directory using http protocol..getting status code error 403

i am trying to connect to remote exchange using powershell..while using powershell session i get status error 403...i changed the settings in iis manager...i have set all the settings in the iis manager as said in the msdn support blogs...yet i get the same error when i access it in the client url and also in powershell of the client computer...if i cannot connect using powershell,can i connect using .net???somebody help me...i am beginner and i am stuck...

How do I add smtp status code to this?

I have this code that logs an error when it occurs at the application level.  This is in a class of it's own.  I then have the logic in the global asax file that calls this code and passes in the base and inner exception along with some other info.I want to add the smtp status code to this so it's captured when an error occurs.  I think this will make it easier to figure out what's wrong when something goes wrong.I'm not clear on the best way to capture the smtp status code though.  How should I add this to this code?Global.asax file: protected void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs Exception baseException = Server.GetLastError().GetBaseException(); Exception innerException = Server.GetLastError().InnerException; string stackTrace = Server.GetLastError().StackTrace; // gets the name of the application that caused the exception string source = Server.GetLastError().Source; string baseException2 = baseException.Message.ToString(); string innerException2; if (innerException != null) { innerException2 = innerException.ToString(); } else { innerException2 = "Inner exception is null

JQuery: is there a way to show status message - from code behind?


i am trying to figure out how to display message box after it done executing the server side code

 here is the code which works from the client side but still looking for a way to make it work from code-behind


<div id="status"></div>


$("#status").fadeTo(500, 1, function() { $(this).html("You are now registered!").fadeTo(7000, 0); })

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Object referen



 i have a dropdownlist and Datagrid control on form. i wanted to refresh the grid

on changing  the DropDown OnSelectedIndexChanged, but when i do change

the dropdown value then it give me fallowing error message.

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

Can any one help me, how to solve this problem?

Code given below.


                <asp:DropDownList ID="ddColor" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddColor_SelectedIndexChanged"
                    <asp:ListItem Selected="True">Red</asp:ListItem>

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the



 I am using Ajax RC 1.0

Initially my application was simple ASP.NET 2.0 application and later on client decided for implementing AJAX.

My form is containg datagridview inside UpdatePanel and one textbox also. datagridview is having all rows editable. I have master page implemented.

I am updating records on lost focus of any text box(inside datagridview  and outside also) 

Problem is that I am able to run my application locally without any problem. But when I am publishing my website on server it is giving me following error:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

I have uploaded following DLL's on server: AjaxControlToolkit.dll, AJAXExtensionsToolbox.dll, Microsoft.Web.Extensions.Design.dll and Microsoft.Web.Extensions.dll

Please let me know the solution of this problem.

Error: Sys.WebForms.PageRequestManagerServerErrorException


When    I am going to export datatable into excel , I am getting a problem.

From Visual studio It's working fine but when I published it , gives error in windows 7

error : Sys.WebForms.PageRequestManagerServerErrorException

but when I browse through XP it gives error :Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500.

The code I used  for Export given below :








xlApp =

xlWorkBook = xlApp.Workbooks.Add(misValue);

xlWorkSheet = (Excel.

xlWorkSheet = (Excel.

xlWorkSheet.get_Range(xlWorkSheet.Cells[1, 1], xlWorkSheet.Cells[65535, 1]).EntireColumn.NumberFormat =

xlApp.Visible =



data = dataTable.Columns[i].ColumnName.ToString();

xlWorkSheet.Cells[1, i + 1] = data;







data = dataTable.Rows[i].ItemArray[j].ToString();

xlWorkSheet.Cells[i + 2, j + 1] = data;




xlWorkBook.SaveAs(sFileName, Microsoft.Office.Interop.Excel.

xlWorkBook = xlApp.Workbooks.Open(sFileName,misValue, misValue, misValue, misValue, mi

WsHttpBinding: No FaultException for http status code 400 (for 500 everything works fine)


A .NET client consumes web services using Soap 1.2 via WCF. The services generate SOAP errors with http status code 400 and body containing SOAP fault code as well as subcodes. The client side exception that is thrown only contains InnerException = {"The remote server returned an error: (400) Bad Request."} without ability to access SOAP error code information.

For http status code 500 type of errors everything works fine by raising a FaultException with information.

Is there any flag to get it working for http status code 400 as well?

A solution for the Sys.Webforms.PageRequestManagerServerErrorException problem


I was receiving the Sys.Webforms.PageRequestManagerServerErrorException error with an ASP.NET AJAX project I was working on.  I searched the Forums and other sources and found some common recommendations, but none worked.  Here's a summary of the cause and solution:

1) The web.config had the customErrors tag mode="RemoteOnly" and a custom Error page.  This caused the exception to happen with server deployments, but not show itself with local development environments.

2) The custom Error page causes the Response to AJAX Request to be altered and therefore causing the PageRequestManagerServerErrorException

3) Setting the AllowCustomErrorsRedirect="false" on the ScriptManager prevents the custom Error page from being used with AJAX Requests - http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.allowcustomerrorsredirect.aspx.

4) Define an OnAsyncPostBackError event handler on the ScriptManager to handle exceptions and set the OnAsyncPostBackErrorMessage to a user friendly error message the can be displayed to the user - http://msdn.microsoft.com/en-us/library/system.web.ui

sys.webforms.pagerequestmanagerservererrorexception 503 Error


Hi All,

I am using VS2005, .net2.0, Ajax with Oracle 11g and ODP.Net. I have a report that I am calling from .aspx page.
Its a complex report so its taking approx. 5mins. to load. I am using update panel.
But exactly after 3mins after the page load, I am getting this error.. "sys.webforms.pagerequestmanagerservererrorexception: 503" Error and its stop loading the page further.
This is happening only in DEV and UAT server(DEV & UAT both in the same box). This is working fine in my local system.

I donno whether this error related to timeout. So I have tried allmost all possibilities like..
1) Increasing the timeout by adding...<asp:ScriptManager id="ScriptManager1" runat="server" EnablePartialRendering ="true" AsyncPostBackTimeout ="36000">.
2) Increased the Oracle ODP.Net command timeout "OracleCommand.CommandTimeout = 36000"
2) Added.. <sessionState mode="InProc" timeout="3600"></sessionState> in the web.config file.
3) Added.. <httpRuntime timeout="3600"> in the web.config file.
4) IIS server, I have set these values for the "Default Website"....... "Connection timeout : 600 secs",&nbs

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: RAISEERROR


I'm getting this error:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: You cannot add to the repair list until the barcode is added to Inventory first.

 Now the 'You cannot add to the repair list until the barcode is added to Inventory first.' is my own message being returned from

sql server.


I have a datagrid with a new button on it. When the user clicks on the button I insert a blank row in the grid. They then go to edit the record to put info in the grid.

Since the system is a barcode driven system, I check the barcode they entered to make sure it's in the system. If not I throw the message from sql server using the RAISEERROR event.

Here is the partial sql code:

	if not exists(select * from dbo.tblIndentification 
				where Identification_Barcode = @barcode) 
		RAISERROR(50020,11,1)  with NOWAIT
		return -1


Here  is the c# code:

                else if (e.CommandName.Equals("Update"))
                    //for use in conjuction when the user inserts a new row
                    if  (txtCurrentRowBeingEdited.Text=="")

Sys.WebForms.PageRequestManagerServerErrorException - Specified cast is not valid



I'm getting the error in the subject whenever I run my application.  I think that it may be related to this:  http://forums.asp.net/p/1038043/1438409.aspx#1438409 and since I have <compilation debug="true" />, I think setting that to false may aid not getting this, as is what it seems as if I read.  So, Is that correct, or is this related to something else?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend