|
Home > Archive > Microsoft Content Management Server > April 2006 > HttpHandler and CMS
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
HttpHandler and CMS
|
|
| David @ WSDOT 2006-04-01, 2:40 pm |
| I set up an HttpHandler in ASP.NET to handle .RSS extensions in the
web.config and in IIS. It works great serving and handling .RSS files on the
file system, i.e. http://localhost/mywebsite/news.rss
However, this does not affect postings being served by CMS. For example,
the "default" posting in the "news" channel with the .rss extension:
http://localhost/news/default.rss, renders the posting exactly as it would if
the URL was default.htm (or any other extension at that matter).
Is there an easy way modify CMS (like modifying ASP.NET) to allow for
different behavior based on the file extension?
<hr>
My work around is to use Page.Request.QueryString["NRORIGINALURL"] of the
posting to check if the extention is .RSS. Then render:
Page.Response.Clear();
Page.Response.ContentType = "text/xml; charset=utf-8";
RssXmlControl.RenderControl(writer);
Page.Response.End();
I know a lot of sites do it this way. If you "view source" you will get a
message: "The XML source file is unavailable for viewing"
| |
| Stefan [MSFT] 2006-04-01, 2:40 pm |
| Hi David,
that is not possible.
MCMS does not use the part behind the dot.
It just throws away the part behind the dot as it needs to map the item to
the channel and posting names.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------
"David @ WSDOT" <DavidWSDOT@discussions.microsoft.com> wrote in message
news:11458BF8-2A22-465F-AFEA-5F32CF98B8BD@microsoft.com...
>I set up an HttpHandler in ASP.NET to handle .RSS extensions in the
> web.config and in IIS. It works great serving and handling .RSS files on
> the
> file system, i.e. http://localhost/mywebsite/news.rss
>
> However, this does not affect postings being served by CMS. For example,
> the "default" posting in the "news" channel with the .rss extension:
> http://localhost/news/default.rss, renders the posting exactly as it would
> if
> the URL was default.htm (or any other extension at that matter).
>
> Is there an easy way modify CMS (like modifying ASP.NET) to allow for
> different behavior based on the file extension?
>
> <hr>
>
> My work around is to use Page.Request.QueryString["NRORIGINALURL"] of the
> posting to check if the extention is .RSS. Then render:
>
> Page.Response.Clear();
> Page.Response.ContentType = "text/xml; charset=utf-8";
> RssXmlControl.RenderControl(writer);
> Page.Response.End();
>
> I know a lot of sites do it this way. If you "view source" you will get a
> message: "The XML source file is unavailable for viewing"
|
|
|
|
|