Context.Items.Add on an XML return type?
- by Scott Schluer
So I have the following code contained within an HttpModule in an application I've been asked to support:
app.Context.Response.ContentType = "text/xml";
app.Context.Items.Add("IpixRoomId", ipixRoomId);
app.Context.Items.Add("IpixId", ipixId);
app.Context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
app.Context.RewritePath(rewriteUrl, true);
What's the purpose of adding data to Context.Items when the content type is XML?
EDIT: For clarification, I'm calling up this URL:
http://website.com/virtualtour/1971/6284/panorama2flash.swf
I assume the SWF file (I know very little about Flash) makes another call to http://website.com/virtualtour/config.xml. The code I pasted above only executes on calls to config.xml. So since it's only the SWF file and config.xml being requested from the server, I'm a little confused. Can the .SWF file have access to HttpContext.Current.Items?
Other than the HttpModule, there is no .NET involved in the code, it's a straight request to the SWF file which triggers a call to config.xml but it seems that those Context.Items contain the data needed to make the SWF file display the right virtual tour. I'm just missing where that link happens. It can't happen in the XML, so maybe in Flash?