Loosing skinned images on odd postback

8 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 03 Sep 2008 Link to this post

    Hello,

    Using RadAjaxManager + RadScriptManager in a base page which loads modules.( v2.826)

    Since some days I am experiencing a strange problem on ajax postbacks: on every  odd postback, I am loosing the images of skinned imagebuttons  implied in ajax postback.
    To be more explicit, I have a reset button which reset data in a tabstrip/multipage serie of data. First time I push it, it looses it image, second time it's back again, etc.
    Same problem with buttons in a pager/datalist with itemtemplates: next page no more image for buttons in the itemtemplate of datalist, next page again, image are back. I checked it doesn't depends on displayed data.

    I'am unable to find  the reason why. When I suppress Ajax, everything works fine.

    I am unable to recreate the problem on a small project and my project is too large to easilly debug.
    It seems that client is loosing its path to server app.
    Client sourcecode shows correct path for theses images, but they are not loaded, I have no error detected by IE7.
    Is there a way to display this path clientside in some javascript ?
    Is there a way to trace serverside what javascript is sent to client ?
    Is Ajax.net working on this path in any way ?

    Thanks for help and suggestions.

    CS
  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 08 Sep 2008 Link to this post

    Hello Christian,

    Unfortunately from the provided explanation I cannot say for certain what might be the exact reason for the odd issue you are facing. There are a couple of things that you might want to test in order to trace the cause of the abnormality and tackle it:

    • Does replacing the RadAjaxManager with plain MS UpdatePanels produce the same result with the styled image buttons?
    • Does replacing the RadScriptManager control with standard ScriptManager makes a difference?
    • What happens if you register manually the styles for the skinned buttons in the head section of the page (using <link rel='stylesheet' ... /> tag)?

    The results from these tests can help us identify the core of the problem to eliminate it. You may also use the Fiddler tool or FireBug to inspect the traffic between the client and the server and see how the styles/images for the buttons are served on odd server submits.

    Kind regards,

    Stephen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 08 Sep 2008 Link to this post

    Hello Stephen,

    I have installed Fiddler and I think now that tehre is a problem with ajax and url rewriting.
    MS, Telerik or me I don't know.

    I found that after an ajaxified button click all the request for images and css resources using a theme are broken.
    For exemple, on first page display I get something like:
    GET /App_Themes/Web20/img/WT_next_en.gif HTTP/1.1
    and after pressing the button:
    GET /site/929/App_Themes/Web20/img/WT_next_en.gif HTTP/1.1

    Here you may notice that the prefix '/site/929' is added: it is my 'false' url. My url rewritter normally transforms this in something understood by my application. But not for resources...

    Next I saw that the page send back with this asynch session is far from being complete, I get something starting as this:

    HTTP/1.1 200 OK
    Cache-Control: private
    Date: Mon, 08 Sep 2008 17:52:33 GMT
    Content-Type: text/plain; charset=utf-8
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    X-AspNet-Version: 2.0.50727
    Set-Cookie: WTCRM_Lang_addonnice=en-US; path=/
    Set-Cookie: PortalAlias=addonnice; path=/
    Set-Cookie: WTCRMSecurity=CC0581B6-5C59-48B5-A5AE-A9D8F623036C@; expires=Mon, 08-Sep-2008 19:52:33 GMT; path=/
    Vary: Accept-Encoding
    Content-Length: 54806

    1318|updatePanel|WebHeaderButton_TPans_M_Creat_999_RadTabStrip1Panel|<div id="WebHeaderButton_TPans_M_Creat_999_RadTabStrip1" class="RadTabStrip RadTabStrip_Web20 RadTabStripTop_Web20 ">
     <!-- 2008.2.828.35 --><div class="rtsLevel rtsLevel1">
      <ul class="rtsUL"><li class="rtsLI rtsFirst"><a class="rtsLink rtsBefore" href="#">


    Is it normal ? the isolated line
    1318|updatePanel|WebHeaderButton_TPans_M_Creat_999_RadTabStrip1Panel|

    seems something broken.
    Looks like some pb in Render ???
    But I catch, trace and rethrow all exceptions in render on my code.

    I will continue exploring, but if my results bring some idea...
    Should I open a ticket ?

    Regards

    CS
  5. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 09 Sep 2008 Link to this post

    Hello Stephen,

    More info on my side but still no solution:

    I have followed your suggestions for mymain page and my materpages:
    1) replaced RadScriptMananger by ScriptManager
    2) removed RadStyleSheetManager
    3)  also removed RadToolTipManager
    4) removed formdecorator from aspx and ascx
    5) removed all my own css
    6) I still have a RadAjaxManager in main page(which is not using masterpage) and in all masterPages
    In this configuration problem is still the same: on the first ajax postback IE stops loading from good place for themes and so never finds images.

    I have tried adding a ControlAdapter to ensure that my page postson good url (Cf Scott Guru http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx )
    No effect, in fact this last addition may not be working...

    I have removed the RadAjaxManagerProxy settings and now I get postbacks but everything works Ok.

    Replacing with an UpdatePanel is next step but its take more time.

    Could this pb on IE side could be generated by Ajax ?
    Again when I look a page source in IE, the scr element of IMG or INPUT is well formed, but fiddlers sees a GET for a bad url ????

    Thank for comments.

    CS
  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 09 Sep 2008 Link to this post

    Hello Christian,

    Thank you for the additional information. Indeed it seems that the url rewriting causes the unwanted side effect in this case. What happens if you disable the url rewriting temporary? Does the same problem appear when you replace the ajax manager with standard MS UpdatePanels?

    The results from these tests can shed some additional light on the matter in order to tackle it appropriately.

    Best regards,
    Stephen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 09 Sep 2008 Link to this post

    Hello Stephen,

    What are the Telerik recommandations concerning Url rewriting  and radControls usage ?
    I'am certainly not the only to use it.

    Thanks
    CS
  8. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 09 Sep 2008 Link to this post

    Hi Christian,

    I believe that as long as your url rewriting logic is not in conflict with the ASP.NET AJAX framework and its asynchronous nature, it should function properly with our ASP.NET AJAX controls as well. That is the reason I asked you to test the same case with UpdatePanels instead of RadAjaxManager and let us know what your findings are.

    Kind regards,
    Stephen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 10 Sep 2008 Link to this post

    Stephen,

    Finally I have solved my issue with themes/ajax+url rewriting.
    It was on my side: all my skins were using relative path, so when the rawurl was a real one, IE was requesting with relatives path, but on some conditions, related to rawurl begining defferent from the first one, IE transforms the request url for images and css using the rewriten url.
    And from this points things get worse.
    It is a very common mistake but I forget to check it....take me 5 days....

    Anyway, thanks for support.

    CS
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017