473,594 Members | 2,770 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2451
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.Cur rent.RewritePat h("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.Cur rent.RewritePat h to change the path again for postbacks.

Following this, the caching all goes to pot.
"Brock Allen" <ba****@NOSPAMd evelop.com> wrote in message
news:29******** **************@ msnews.microsof t.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
3251
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 "return promptBeforeOpening();" FF and IE rewrite it as I would expect them to, but it turns out that that doesn't work (no disclaimer pops up, and the link is not disabled):
0
2129
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. After looking at the use of the OutputCache directive and tinkering with it a bit I found its usability.very limited. Think of it: it is okay for static content. Well that's nice but no big deal. Static content is cheap anyway, the file system...
0
1043
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 that scans whether the URL needs to be rewritten, and if so, it passes back the Page built from the rewritten url. I am trying to combine this with OutputCache or some kind of caching. Could someone recommend me the best way to do this or...
4
1341
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 to be missing a change that has broken a lot of my applications, relating to the order in which members are returned by reflection. At least I can't find it. I reported the bug on ladybug:...
0
2171
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 other user ? So ....Session state and kernel-mode output caching don't mix. Has this bug been fixed?
0
1149
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? Will request go to web service if item is in cache. And if i am using data aching will request to to webservice if item is cached.
3
4723
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 write. While working on a similar, though partially unrelated, issue, I came across a possible alternate method. Before I pursue this method in full, I wanted to get opinions of others as to any unforseen issues I might encounter. The method is...
3
6447
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 solved? can help me? thanks.
2
1818
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 ReadHtmlPage(string url) { WebResponse objResponse; WebRequest objRequest = System.Net.HttpWebRequest.Create(url); objResponse = objRequest.GetResponse();
0
7874
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8227
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5402
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3853
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3893
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.