xmldatasource saving but not writing to file?

2 posts, 0 answers
  1. SelAromDotNet
    SelAromDotNet avatar
    67 posts
    Member since:
    Jul 2012

    Posted 25 Nov 2008 Link to this post

    I am encountering the STRANGEST error... I have a radgrid, and following this example: http://www.telerik.com/help/aspnet-ajax/grdpopulationfromxmldatasource%20control.html I have manged to make my grid bind to my xml file and locally, it works great. If I make changes, it writes to the xml file and rebinds, and the front end binds to the same file and sees the updates immediately. everything works great!

    however, when I publish this same code to my live site (using sitefinity 3.5), I get completely different results. The grid on the admin side does bind correctly to the file, as does the front end. However, if I make changes in the grid, the changes ARE PERSISTED, SOMEWHERE, but NOT in the xml file! I have inspected it OVER AND OVER AND OVER and the file does not change at all. Not even the modified date changes. However, the grid DOES save the changes, and what's more, so does the front end! which is bound to the same xml file! how is this possible?!

    it appears to be some kind of caching issue, because if I edit web.config just by adding and removing a space and saving, the site recompiles and the changes are lost. However until then, I can go DAYS without losing my changes, even though they aren't written to the xml file! I can understand the grid binding correclty, but how in the heck can the front end do it too if the original xml file is never changed?

    as I was writing this it occured to me that it might be a permissions issue... and it looks like I'm right. tracing the application it looks like the xml file doesn't have write access... so that answers that question!

    but how is that if the xml file was never changed, that the front end repeater can bind to that same xml file and see the new data?
  2. Sebastian
    Sebastian avatar
    9934 posts

    Posted 28 Nov 2008 Link to this post

    Hello SelArom,

    Thank you for the detailed explanation. Unfortunately the issue is indeed very strange and I am not able to provide a definite answer about the exact reason for it - can you please check whether the abnormality appears when moving the page with the grid outside of Sitefinity?

    It is definitely unclear why before adding write permissions for the xml file the data in the grid has been updated as expected despite the actual source xml data has never been changed. Can you simulate this oddity in a sample test project hosting the grid in a standard web site? We will appreciate if you can post such a demo through our support ticketing system. Thus we will test/debug it locally and will advice you further.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top