RssFeed Class

Topics: Developer Forum
Mar 6, 2010 at 8:00 PM

Hi,

I'm facing a strange problem with the RssFeed Class which is the handler used to handle .rss requests.

The BeerHouse 3.5 WebForms sample I downloaded is working fine.When I click an RSS link it works.But the one I'm making doesn't work as the sample. 

Every thing looks correct but even so I got "The Page Cannot be found error".I'm testing the website localy but using the IIS to run the website.

I added .rss extention to IIS HttpHeaders but it was no use.

I put Breakpoints in the RSSFeed Class code but they have never been hit.

This is the line for registering the handler in web.config file:

<font size="2" color="#0000ff"><font size="2" color="#0000ff">

<

</font></font><font size="2" color="#0000ff">

 

</font>

add verb="*" path="*.rss" validate="false" type="MyProject.RSSFeed,MyBLL,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null"/>

Hope there is someone who can help...

 

 

Coordinator
Mar 27, 2010 at 4:58 PM

My best guess is you do not have .rss file extensions mapped correctly in your IIS. I wrote a blog on setting up wildcard extensions in IIS 6 a while back. I really need to get some time to do the same for IIS 7 :)

http://professionalaspnet.com/archive/2007/07/27/Configure-IIS-for-Wildcard-Extensions-in-ASP.NET.aspx

So there are two places you need to check, the first is your web.config. You need to map the .rss extension to the custom handler

This is what is in the web.config that ships with the project:

		<httpHandlers>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
			<add verb="*" path="forum.rss" validate="false" type="RSSForum, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null"/>
			<add verb="*" path="Products.rss" validate="false" type="ProductsRSS, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null"/>
			<add verb="*" path="*.rss" validate="false" type="TheBeerHouse.RSSFeed, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null"/>
			<add verb="*" path="*.ics" validate="false" type="vCalHandler, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null"/>
			<add verb="GET" path="sitemap.xml" validate="false" type="TBHBLL.Navigation.SiteMapsHandler, TBHBLL, Version=3.5.0.1, Culture=neutral, PublicKeyToken=null"/>
			<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/>
		</httpHandlers>

Notice how in this case I mapped the actual rss file name to the appropriate HttpHandler to produce the desire results.
The next place to check is possibly in your IIS mappings. Remember if a file extension is not mapped through the ASP.NET engine it will never get processed by the ASP.NET engine. I hope this helps you out.
Mar 27, 2010 at 7:08 PM

Hi,

I read your blog about IIS wildcard extentions.But I have Windows XP Professional and IIS 5.1 and I don't see any WildCard Insert button in it.So I tried to use the Add button instead to add application mapping extention but it was no use.

What should I do?