473,326 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

URL Rewriting breaking Output Caching

Can these two functions coexist?

We have a web site where the querystrings are removed using URL Rewriting.
Instead the page appears to be a html page with a long name (containing what
would be in the querystring).

I have tried switching on output caching and varying by a parameter and
using VaryByCustom but the caching simply does not work. Tested it by
adding the time to the bottom of the page and the time updates every time we
refresh the page, even though the timeout on the cache is 60 seconds.

Can anyone shed any light?
Nov 19 '05 #1
2 2442
When do you do the Url Rewriting? In global.asax? What method/event? The
output cache gets involved in the HttpPipeline fairly early, so you'd need
to plan when to do the rewriting. I've not tested the two together, so I'm
not sure what the results would be. I'll flag this post so I can go do some
testing. Fun stuff :)

-Brock
DevelopMentor
http://staff.develop.com/ballen
Can these two functions coexist?

We have a web site where the querystrings are removed using URL
Rewriting. Instead the page appears to be a html page with a long name
(containing what would be in the querystring).

I have tried switching on output caching and varying by a parameter
and using VaryByCustom but the caching simply does not work. Tested
it by adding the time to the bottom of the page and the time updates
every time we refresh the page, even though the timeout on the cache
is 60 seconds.

Can anyone shed any light?


Nov 19 '05 #2
I do the easy version of URL Rewriting ;-)

Say I want to see a URL in the browser that looks like
http://www.thingy.co.uk/English.News.23 that maps to
http://www.thingy.co.uk/news.aspx?La...glish&Story=23.

In global.asax BeginRequest I change the path using
HttpContext.Current.RewritePath("news.aspx")

I pass the querystring too and add an extra item to the querystring to say
waht the original URL was. I then pick this out in the page and use
HttpContext.Current.RewritePath to change the path again for postbacks.

Following this, the caching all goes to pot.
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:29**********************@msnews.microsoft.com ...
When do you do the Url Rewriting? In global.asax? What method/event? The
output cache gets involved in the HttpPipeline fairly early, so you'd need
to plan when to do the rewriting. I've not tested the two together, so I'm
not sure what the results would be. I'll flag this post so I can go do
some testing. Fun stuff :)

-Brock
DevelopMentor
http://staff.develop.com/ballen
Can these two functions coexist?

We have a web site where the querystrings are removed using URL
Rewriting. Instead the page appears to be a html page with a long name
(containing what would be in the querystring).

I have tried switching on output caching and varying by a parameter
and using VaryByCustom but the caching simply does not work. Tested
it by adding the time to the bottom of the page and the time updates
every time we refresh the page, even though the timeout on the cache
is 60 seconds.

Can anyone shed any light?


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jamie Jackson | last post by:
I'm rewriting all links' onclick events, but I'm having a problem. The onclick event that I'm inserting works correctly in Opera, but not in FF or IE. I'm retroactively adding the statement...
0
by: Martin | last post by:
Hi. I had a very frustrating afternoon and evening but I have got it all under control now so all of a sudden I am in a good mood. I want to share some insights on output caching with you lot. ...
0
by: djmc | last post by:
Hi, I am trying to use a URL Rewriting technique outlined here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp Basically I create a HTTPHandlerFactory...
4
by: John Wood | last post by:
I saw that Microsoft have released a list of breaking changes in .Net here: http://msdn.microsoft.com/netframework/programming/breakingchanges/runtime/default.aspx While this is useful, it seems...
0
by: jason | last post by:
hi experts, support.microsoft.com/kb/917072 and http://msdn.microsoft.com/msdnmag/issues/06/07/WebAppFollies/ As pointed out in these articles, users might get session variables belong to...
0
by: archana | last post by:
Hi all, Can someone tell me how the caching is implemented. Means how data is stored in output caching and data caching. If i am using output caching will that cache maintain on client side?...
3
by: Greg Collins [Microsoft MVP] | last post by:
I have done a bit of research of Url Rewriting, but as yet have been unsuccessful at getting it to work well, and there are issues around what file types are supported and how much code you want to...
3
by: ary | last post by:
I try to create a weblog host site! in this case i can't use cache for every page because that cause to be my Server ram full of caching page. but if I can save cache in hard disk my problem...
2
by: Ken Fine | last post by:
I have a question about ASP.NET output caching. I want to use screen scraping as a temporary hack to pull in some complex Classic ASP-rendered content into some ASP.NET pages: protected String...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.