Last post Jul 06, 2005 02:30 AM by ariya
May 20, 2005 03:32 PM|rolus|LINK
I have been trying to write an HTTPHandler to append an GUID to incoming requests to my website. I need to append a GUID to break any kind of caching I have only 1 page, so the GUID can remain the same on Subsequent request from the same client.
I want to change http://www.mysite.com/Default.aspx
I want to refrain from doing a redirect from the initial page, also when I tried response.redirect from the handler class, I ended up in an infinite loop!
May 21, 2005 11:37 AM|master4eva|LINK
On the handler, why don't you have some basic code like:
string url = HttpContext.Current.Request.RawUrl;
Guid guid = Guid.NewGuid();
if (HttpContext.Current.Request.QueryString["Id"] == null)
HttpContext.Current.Response.Redirect(url + ((url.IndexOf('?') > 0) ? "&Id=" : "?Id=") + guid.ToString());
Jul 06, 2005 02:30 AM|ariya|LINK