Net 3.5 SP1 pb with ajax.net and themes + url rewritting

Discussion in 'ASP .Net' started by WT, Nov 25, 2008.

  1. WT

    WT Guest

    Hello,

    I discovered that after an ajax callback IE7 tries to reload all the css of
    my current theme.
    This seems to be a new featured appeared after sp1.
    Problem is that I am using url rewritting and it seems that this reloading
    is done not using the firts and correct initialload path (because all my css
    are applyed initially) but a new path with the rewritten url, and my url
    rewritter do not rewrite for css extensions, so IIS generates a 404.
    It has no effect on the display as css is still ok afyter postback but it
    introduce a lot of unecessary activity on server and slow everything.

    Anybody having this problem and knowing what could have changed and how to
    circumvent ?

    Thanks for help.

    CS
    WT, Nov 25, 2008
    #1
    1. Advertising

  2. WT

    bruce barker Guest

    if there are any css links in the update panel they will be reloaded. if the
    url is wrong, the old styles will be used. use fiddler to monitor the
    requests to see what is going on.

    -- bruce (sqlwork.com)


    "WT" wrote:

    > Hello,
    >
    > I discovered that after an ajax callback IE7 tries to reload all the css of
    > my current theme.
    > This seems to be a new featured appeared after sp1.
    > Problem is that I am using url rewritting and it seems that this reloading
    > is done not using the firts and correct initialload path (because all my css
    > are applyed initially) but a new path with the rewritten url, and my url
    > rewritter do not rewrite for css extensions, so IIS generates a 404.
    > It has no effect on the display as css is still ok afyter postback but it
    > introduce a lot of unecessary activity on server and slow everything.
    >
    > Anybody having this problem and knowing what could have changed and how to
    > circumvent ?
    >
    > Thanks for help.
    >
    > CS
    >
    bruce barker, Nov 25, 2008
    #2
    1. Advertising

  3. WT

    WT Guest

    Hello Bruce,

    Exactly what I discovered.

    I found an apparent solution as I am using net 3.5 sp1,
    I change the Form.action to the url before rewriting and I don't get the 404
    errors due to bad urls for css, css files from my theme do not seem to be
    reloaded.

    I think it is totally crazy: when I set into form.action an inexistant url
    (the one built for rewritter), I don't get the 404 not found errors because
    no reloading is done.
    And if I let form.action whitout modification, it get the real url
    (rewritten) in form.action, but this fact seems to triggers reloading of all
    css from theme after a callback, the reloading being done with the
    unexisting url made for the rewritter...

    Seems that browser is doing a check on the submit url in form.action to see
    if some css has to be reloaded, but the url to reload from (application
    relative ?) is not taken from same place ?

    CS


    "bruce barker" <> a écrit dans le
    message de news:...
    > if there are any css links in the update panel they will be reloaded. if
    > the
    > url is wrong, the old styles will be used. use fiddler to monitor the
    > requests to see what is going on.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "WT" wrote:
    >
    >> Hello,
    >>
    >> I discovered that after an ajax callback IE7 tries to reload all the css
    >> of
    >> my current theme.
    >> This seems to be a new featured appeared after sp1.
    >> Problem is that I am using url rewritting and it seems that this
    >> reloading
    >> is done not using the firts and correct initialload path (because all my
    >> css
    >> are applyed initially) but a new path with the rewritten url, and my url
    >> rewritter do not rewrite for css extensions, so IIS generates a 404.
    >> It has no effect on the display as css is still ok afyter postback but it
    >> introduce a lot of unecessary activity on server and slow everything.
    >>
    >> Anybody having this problem and knowing what could have changed and how
    >> to
    >> circumvent ?
    >>
    >> Thanks for help.
    >>
    >> CS
    >>
    WT, Nov 25, 2008
    #3
  4. Hi,

    First, could you read the Handling CSS and Image Reference Correctly
    chapter in the following article to see if it's the cause of this issue?

    http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-wi
    th-asp-net.aspx

    If it still doesn't work please provide a simple demo that can reproduce
    this problem. You can send the project to me:



    Please update here when you've sent the project in case I missed that email.

    Regards,
    Allen Chen
    Microsoft Online Community Support

    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

    Note: MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 2 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions. Issues of this
    nature are best handled working with a dedicated Microsoft Support Engineer
    by contacting Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Allen Chen [MSFT], Nov 26, 2008
    #4
  5. WT

    WT Guest

    Thanks Allen,

    I know about this Scott article, but it has to be updated with new net 3.5
    sp1/IIS7 features.
    Question was just how is behaving IE7 concerning url used to reload css
    after an ajax callback.

    CS

    "Allen Chen [MSFT]" <> a écrit dans le message
    de news:jo$...
    > Hi,
    >
    > First, could you read the Handling CSS and Image Reference Correctly
    > chapter in the following article to see if it's the cause of this issue?
    >
    > http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-wi
    > th-asp-net.aspx
    >
    > If it still doesn't work please provide a simple demo that can reproduce
    > this problem. You can send the project to me:
    >
    >
    >
    > Please update here when you've sent the project in case I missed that
    > email.
    >
    > Regards,
    > Allen Chen
    > Microsoft Online Community Support
    >
    > Delighting our customers is our #1 priority. We welcome your comments and
    > suggestions about how we can improve the support we provide to you. Please
    > feel free to let my manager know what you think of the level of service
    > provided. You can send feedback directly to my manager at:
    > .
    >
    > ==================================================
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
    >
    > Note: MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 2 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions. Issues of this
    > nature are best handled working with a dedicated Microsoft Support
    > Engineer
    > by contacting Microsoft Customer Support Services (CSS) at
    > http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
    > ==================================================
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    WT, Nov 26, 2008
    #5
  6. Hi CS,

    Thanks for your update. I think we need to clarify the following things
    first before discussing further.

    " Are you getting the 404 on the first page load or only after the postback?

    " Based on my test, when we put the CSS file in the UpdatePanel, if the CSS
    file has been downloaded successfully on the first page load IE 7 will not
    download it again after the asynchronous postback. So may the URL of the
    CSS file be wrong, as Bruce said (namely you get 404 on the first page
    load)?

    " If you only get 404 after the asynchronous postback could you check if
    the returned status code of this file is normal on the first page load? One
    possible reason I can guess is some new <link ..>s is created on that
    postback that cause this problem.

    " The most important thing, could you tell me what the URL is
    on the addressbar of IE when you get the 404? I have a strong feeling that
    it's not related to the css and AJAX. Can you remove the theme and test a
    normal postback to see if you still get 404? My guess is, you're using the
    Form control mentioned in the following article:

    http://msdn.microsoft.com/en-us/library/ms972974.aspx

    And you're accessing the page with the correct URL. For example,
    http://localhost:20370/Test/Default.aspx. Since the action of the form is
    empty the page will post back to http://localhost:20370/Test/, which will
    probably cause 404 error.

    I think it would be better for me to get a demo from you and know your IIS
    version. In this way I can keep my environment the same as yours, which can
    help us find the solution faster.

    You can send the project to me via:


    Please update here when you've sent the project in case I missed that email.

    Regards,
    Allen Chen
    Microsoft Online Community Support
    Allen Chen [MSFT], Nov 27, 2008
    #6
  7. Hi CS,

    Do you have any progress on this issue?

    Regards,
    Allen Chen
    Microsoft Online Community Support
    Allen Chen [MSFT], Dec 4, 2008
    #7
  8. WT

    WT Guest

    Hello Allen,
    Sorry not replying, I have been very busy.
    I solved the problem with the net 3.5 fonctionnality and force the post url
    to something identical to the not rewritten one, clearing the effect of
    rewritter ...and it worked, no more 404.
    But I still don't understand what is happening between ajax and postback
    url, no time to invest the code.

    Thanks for,help.
    CS


    "Allen Chen [MSFT]" <> a écrit dans le message
    de news:p...
    > Hi CS,
    >
    > Do you have any progress on this issue?
    >
    > Regards,
    > Allen Chen
    > Microsoft Online Community Support
    >
    WT, Dec 6, 2008
    #8
  9. No problem CS, if you are interested to know the cause of the problem
    later, please feel free to update here. We can discuss further on this
    issue.

    Have a nice day!
    Allen Chen
    Microsoft Online Community Support
    Allen Chen [MSFT], Dec 8, 2008
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christopher Benson-Manica
    Replies:
    0
    Views:
    417
    Christopher Benson-Manica
    May 11, 2004
  2. =?Utf-8?B?cmFwaWRkYXRh?=

    url rewritting with no extension in url

    =?Utf-8?B?cmFwaWRkYXRh?=, Oct 31, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    300
    =?Utf-8?B?cmFwaWRkYXRh?=
    Oct 31, 2006
  3. Vijay
    Replies:
    1
    Views:
    303
    Joern Schou-Rode
    Nov 1, 2008
  4. Paul

    rewritting the standards

    Paul, Feb 26, 2011, in forum: C++
    Replies:
    0
    Views:
    209
  5. Judy
    Replies:
    0
    Views:
    1,028
Loading...

Share This Page