WebForms.PageRequestManagerServerErrorException: Status code 500

Last post 12-10-2009 5:53 AM by anruvel. 32 replies.

Sort Posts:

  • WebForms.PageRequestManagerServerErrorException: Status code 500

    11-14-2006, 2:45 AM
    • Member
      35 point Member
    • ssanand
    • Member since 01-09-2006, 5:44 AM
    • Posts 9

    Hi

    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

    Regards

    Anand

     

     

     

     

  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-14-2006, 5:00 AM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello.

    can you post a simple demo project that reproduces this problem?

    thanks. 

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-14-2006, 6:00 AM
    • Member
      35 point Member
    • ssanand
    • Member since 01-09-2006, 5:44 AM
    • Posts 9

    Upps... It is not with the DatakeyNames property. I'm getting error when adding BoundFields to grid by hand (i.e. from code). It is working fine with AutogenerateColumns = True

    Regards

    Anand

     

     

  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-17-2006, 9:34 AM
    • Member
      62 point Member
    • amelincc
    • Member since 12-17-2002, 9:00 AM
    • New York City
    • Posts 13

    Hi,

    Did you ever get to the root of this issue?  I'm currently on ajax beta 2 and the scenario is similar, an UpdatePanel with a GridView, I manually specify each column in the markup and use an ObjectDataSource binding through a home-cooked DAL. 

    One of the columns, which has an imagebutton that opens a window via javascript window.open raised this error once.  I can't reproduce it consistently but it is a concern.

     Any info on this would be appreciated,

     Chris.-

  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-20-2006, 11:21 AM
    • Member
      25 point Member
    • mrjohnny
    • Member since 11-10-2006, 2:56 PM
    • Posts 6

    Halo,

     I also get this error with I want to update the GridView.

    Do anyone have solution on this?

    Thanks.

    Johnny

  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-20-2006, 11:25 AM
    • Member
      25 point Member
    • mrjohnny
    • Member since 11-10-2006, 2:56 PM
    • Posts 6

    More details on this issue.

    I can update the GridView when i run the website in ASP.NET developemt server but not when I publish website to other location.

  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-20-2006, 1:58 PM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello guys,

    can anyone build a demo project (a simple one) which illustrates this and send me? thanks. 

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-20-2006, 3:44 PM
    • Member
      25 point Member
    • mrjohnny
    • Member since 11-10-2006, 2:56 PM
    • Posts 6
    Luis Abreu:

    hello guys,

    can anyone build a demo project (a simple one) which illustrates this and send me? thanks. 

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>IE Portal - Development Version</title>
        <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    </head>

    <body>

        <form id="form1" runat="server">

            <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
     
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                <ContentTemplate>
                    <asp:Panel ID="Panel1" runat="server" BorderColor="Transparent" BackColor="White">
                        <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="Black"
                            BorderStyle="Solid" CellSpacing="1" Font-Names="Verdana" Font-Size="9pt" ForeColor="Black"
                            Height="480px" NextPrevFormat="ShortMonth" Width="640px" OnDayRender="DayRender" OnSelectionChanged="SelectDate" >
                            <SelectedDayStyle BackColor="#333399" ForeColor="White" />
                            <TodayDayStyle BackColor="#999999" ForeColor="White" />
                            <DayStyle BackColor="#CCCCCC" HorizontalAlign="Left" VerticalAlign="Top"/>
                            <OtherMonthDayStyle ForeColor="#999999" />
                            <NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="White" />
                            <DayHeaderStyle Font-Bold="True" Font-Size="8pt" ForeColor="#333333" Height="8pt" />
                            <TitleStyle BackColor="#333399" BorderStyle="Solid" Font-Bold="True" Font-Size="10pt"
                                ForeColor="White" Height="12pt" />
                        </asp:Calendar>
                    </asp:Panel>

                    <asp:Panel ID="Panel2" runat="server" CssClass="modalPopup">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true" RenderMode="Block">
                        <ContentTemplate>
                       
                        <asp:Label ID="lblDate" Text="Selected Date" runat="server"></asp:Label>

                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="EventID" DataSourceID="ObjectDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None" Width="300px">
                            <Columns>
                                <asp:CommandField ShowEditButton="True" />
                                <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
                                <asp:BoundField DataField="Detail" HeaderText="Detail" SortExpression="Detail" />
                                <asp:CheckBoxField DataField="Alert" HeaderText="Alert" SortExpression="Alert" />
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
               
                        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}" SelectMethod="GetEventByDate"
                            TypeName="EventsTableAdapters.EventsTableAdapter" InsertMethod="Insert" UpdateMethod="Update">
                            <DeleteParameters>
                                <asp:Parameter Name="Original_EventID" Type="Int32" />
                            </DeleteParameters>
                            <SelectParameters>
                                <asp:ControlParameter ControlID="Calendar1" Name="SelectedDate" PropertyName="SelectedDate"
                                    Type="DateTime" DefaultValue="21/11/2006 00:00:00" />
                            </SelectParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="Date" Type="DateTime" />
                                <asp:Parameter Name="Detail" Type="String" />
                                <asp:Parameter Name="Alert" Type="Boolean" />
                                <asp:Parameter Name="Alertime" Type="DateTime" />
                                <asp:Parameter Name="Original_EventID" Type="Int32" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="Date" Type="DateTime" />
                                <asp:Parameter Name="Detail" Type="String" />
                                <asp:Parameter Name="Alert" Type="Boolean" />
                                <asp:Parameter Name="Alertime" Type="DateTime" />
                            </InsertParameters>
                        </asp:ObjectDataSource>
                       
                        </ContentTemplate>
                        </asp:UpdatePanel>
                       
                        <p style="text-align:center;">
                            <asp:Button ID="OkButton" runat="server" Text="OK"></asp:Button>
                        </p>
                    </asp:Panel>
           
                    <asp:LinkButton ID="LinkButton1" runat="server">Edit Event</asp:LinkButton>
                   
                    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="LinkButton1" PopupControlID="Panel2" BackgroundCssClass="modalBackground" DropShadow="true" OkControlID="OkButton"/>          
                </ContentTemplate>
            </asp:UpdatePanel>           

        </form>
    </body>
    </html>

     This is my project...(I even dunno how to set the date on Calendar1 as TargetCotrolID rather than using an extra LinkButton, could any one help?)

     

  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-20-2006, 3:54 PM
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello.

    sorry, but i can't run this page.

    when i mean a demo, i mean a page or a web app which i can just open with vs and run to see the problem. i can't do that with the previous page. 

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-22-2006, 1:21 PM
    • Contributor
      4,707 point Contributor
    • RTernier
    • Member since 06-05-2003, 1:40 AM
    • British Columbia, Canada
    • Posts 1,106

     I am getting the same error, but I've narrowed it down to the line of code that causes the error, so hopefully this might help. (I cannot send any code / sample project due to the sensitivity of our projects).

     We use Telerik web controls a lot (great contorls!!!). We have a simple Treeview on the left with a bunch of fields on the right. in those fields I have 2 rad editors (WYSIWYG HTMl editors).

    When I click something on the left treeview, it populates information into the fields on the right from the DataBase. WHen I click the first time, it loads everything fine. When I click again on the Treeview, it errors out.

    editor.Html = objasdf.asdfText;

    That line of code kills it. I'm not sure Why, but I know when I comment it out, it works fine...

    So the error could be when you're updating a control that's "ajaxified" already and it messes it up... Not sure

     I hvae about 10 UpdatePanels on my web form, not sure if having that many can cause this as well.

    ----------------

    Edit: I'm looking at the code you provided and you have nested UpdatePanels... is that allowed? I'm not sure if that is what is causing the errors...

    ------------

    Edit #2:  Here is how the error is raised in my scenario:

    Whenever I update a control with HTML text. ie. "<h1> HI </h1>" . I get an error when I update the rad:editor from telerik with '<h1> hi </h1>'.  That is what causes this error for me.

     Again I think it might be custom 3rd party controls mixing with beta asp.net ajax. (I'm using Beta 1 BTW).

    The Killer Ninja Coding Monkeys thank those that mark helpful posts as answers.

    My Site | My Examples | My Blog


  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    11-23-2006, 6:04 AM

    i am also getting this same error and I am using the createUser Control, and yes I to am using nested update panels

     

    could the nested update panels be the issue?

    Filed under:
  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    12-01-2006, 3:23 PM
    • Member
      62 point Member
    • amelincc
    • Member since 12-17-2002, 9:00 AM
    • New York City
    • Posts 13

    I made some progress identifying the issue.  In my case it was the misspelling of the UpdateMethod property of the ObjectDataSource attribute.  I had renamed the method in my data class and forgot to update the html. 

    That being said, this was hard to pinpoint because there is no way to stop at an exception or anything, the problem I believe is that this exception happens internally to the object data source which has been called by the gridview and the exception details are not bubbled up, you just get the misleading 'WebForms.PageRequestManagerServerErrorException: Status code 500' error as the update panel is trying to refresh itself.

    For anybody else who might run into this, I've verified that the cause could also be that you parameters (sql parameters) for either of the insert/update/delete actions are not in the proper order or the right types. They must match the signature of the data method that's supposed to be called.

    Luis, if this is not clear enough, let me know and I'll put a self-contained sample together, although, at least on my case there is nothing to be fixed other than I would like the error that's raised by the updatepanel to include some of the inner exception details.

    Thanks,

     Chris.-

  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    12-13-2006, 9:07 AM
    • Member
      18 point Member
    • samiyilmaz
    • Member since 10-01-2002, 2:17 AM
    • Turkey
    • Posts 6
    Remove EnablePartialRendering="true" attribute.
  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    12-13-2006, 9:07 AM
    • Member
      18 point Member
    • samiyilmaz
    • Member since 10-01-2002, 2:17 AM
    • Turkey
    • Posts 6
    Remove EnablePartialRendering="true" attribute.
  • Re: WebForms.PageRequestManagerServerErrorException: Status code 500

    04-28-2008, 12:13 PM
    • Member
      4 point Member
    • ArchelF
    • Member since 04-28-2008, 4:07 PM
    • Poitiers, France
    • Posts 2
    I have had the same error, certainly because I use FckEditor in an updatepanel,

    I resolved it by adding ValidateRequest="false" in the tag <%@  Page ...%>
Page 1 of 3 (33 items) 1 2 3 Next >