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

W

WT

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
 
B

bruce barker

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)
 
W

WT

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
 
A

Allen Chen [MSFT]

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:

(e-mail address removed)

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:
(e-mail address removed).

==================================================
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.
 
W

WT

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
 
A

Allen Chen [MSFT]

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:
(e-mail address removed)

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

Regards,
Allen Chen
Microsoft Online Community Support
 
A

Allen Chen [MSFT]

Hi CS,

Do you have any progress on this issue?

Regards,
Allen Chen
Microsoft Online Community Support
 
W

WT

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
 
A

Allen Chen [MSFT]

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
 

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top