Moving to new webserver causes entire Page reloads instead of just the RadGrid

4 posts, 0 answers
  1. David
    David avatar
    19 posts
    Member since:
    Aug 2011

    Posted 11 Nov 2020 Link to this post

    I have a RadGrid ASP.NET AJAX control. About a half dozen columns are set with Filters (AutoPostBackOnFilter=True) so you can filter as well you can sort on all columns by clicking any column in the first row. I also have a RadSlidingPane that shows another half dozen filtering choices that apply to the entire grid, allowing you to optionally filter by geography, client, that sort of thing. All of this has worked for many years on my Visual Studio dev machine as well as our production web server (Win2003 with IIS 6). The production web server is an old machine so I spun up a new web server to move the code to. I copied the directory without any changes, to the new web server, configured it in IIS 10.0 correctly (I think) but it doesn't quite work the same. Certain features fail:

    The RadGrid loads all data, however when I try to filter any column, or sort any column, or apply any filters in the RadSlidingPane, the page flashes and no sorting or filtering gets applied. You also don't see a column highlighted if you had chose to sort it. It also doesn't remember any choices I had made in any of the RadComboBox's available in the RadSlidingPane. Basically, it's reloading the entire page instead of just the RadGrid.

    Here is some database layer clues: Normally when someone sorts or filters, the RadGrid is only supposed to refresh one DataSource, what is bound to the RadGrid, the DataSourceID="empMainGrid" - not all 9 DataSource's that are defined on the page. I'm tracing what is happening at the SQL Server Database Layer and I can see all 9 stored procedures being called each time, which is a clear sign something is wrong and the whole page is reloading. On my dev machine and old production web server, only 1 database call happens which is what is supposed to occur.

    Why. This is the exact same directory of files that works perfectly on the old webserver and my dev machine. Moving it to a new machine fails?

    I also tried this upgrade about 4 years ago and gave up. Back then, it was another new web server (Windows 2012 with IIS 6.2) but same issue. I'm trying again now on this latest new web machine (Windows 2019 with IIS 10), it's still failing. My code was built targeting Telerik ASP.NET AJAX v.2016.3.1222.40. Further back, a Telerik v2011 version also worked fine.

    Since it's failing, I just tried upgrading to the most current version of Telerik on my Dev VM: ASP.NET AJAX v2020.3.1021. In my Dev VM, it works on Telerik v2016 as well as the upgraded Telerik v2020. So I tried deploying this new directory to new web server, it still fails. Thus, upgrading to the latest Telerik is probably not the solution. It seems like something is configured wrong on the IIS web server. But what? Or is it something else obvious that I've missed?

    My app is targeting ASP.NET v4.0.30319.

    Thank you for reading all this and please help if you can. I'm out of ideas and feel stuck on this old hardware without a way to upgrade to a new web server.
  2. Attila Antal
    Admin
    Attila Antal avatar
    588 posts

    Posted 16 Nov 2020 Link to this post

    Hi David,

    Thank you for the information.

    To be able to tell you more about the problem, I would need to see the source code of the Grid. Both the ASP declaration and the C# or VB  code from the code-behind.

    You can also submit a formal support ticket and share the details there if you are not feeling comfortable sharing them on the Forum.

    Regards,
    Attila Antal
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

  3. David
    David avatar
    19 posts
    Member since:
    Aug 2011

    Posted 16 Nov 2020 in reply to Attila Antal Link to this post

    Hi Attila,

    Thank you for taking the time to review this. I'm attaching what you have asked, the ASP and C# file. If you need further information please reach out. The "Attach files" control below says "Allowed extensions: .gif, .jpg, .jpeg, .png" so my files were rejected. So I put them on a onedrive link below, if you have another preference please ask. 

     

    https://1drv.ms/u/s!AtaFbXsBiWDFg55XC5Ooc3OOX7vwDQ?e=SPFsan

  4. Attila Antal
    Admin
    Attila Antal avatar
    588 posts

    Posted 19 Nov 2020 Link to this post

    Hi David,

    Thank you for the pages. I wasn't able to debug the page for precise troubleshooting, but I went through the code and I might have a few ideas you can try to help narrow down the problem and spot the error eventually.

    You shared two pages and I was not sure which one is the page affected by this problem. The "MainGrid.aspx" page contains the RadSplitter you mentioned, but the RadAjaxManager on it commented out. That might be one reason AJAX is not kicking in, however, you mentioned that Filtering, Sorting, Paging would not apply either. Based on that my suspicion goes for a broken JavaScript. 

    You may try to test the page again, and while doing that have the browser's Developer Tools open. Hit the F12 button when the page is loaded, the Devtools will open, and on the bottom section, you will find a gear icon to change the settings. Click on that and check the checkboxes for the following options, see snapshot below:

    Once you have that set, test the page but keep the dev tools open and monitor the exceptions in the console. If you see JavaScript errors, try to track them down and eliminate them all. By doing that, the Grid filtering, sorting, paging problem will be fixed. I also advise, that you only enable AJAX when you can confirm the page and its functionalities work. 

    I also checked the "Loads.aspx". This page looks like the one that has multiple Grids, but it has no RadSlider. Here, the RadAjaxManager is on the page and many controls are added to its AjaxSettings. This page uses a MasterPage and having that in mind, I would be interested in seeing if the ContentPlaceHolder is wrapped into a RadAjaxPanel or has AJAX enabled in any way through the MasterPage.

    You can try the same approach to testing this page as I described above. Before you do that, please disable the AJAX or even comment it out completely from both the Loads.aspx and MasterPage if applicable. Ensure there are no JavaScript errors and everything works.

    Once the page and its functionality are working, you may enable the AJAX which then will prevent refreshing the complete page, instead the Control configured in the AJAX settings will be refreshed only.

    Please give these suggestions a try and see if they will help. If you have any questions in the meantime, let me know. 

    Regards,
    Attila Antal
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Back to Top