The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Servlet type functionality in asp.NET ?

I'm working on a .NET web application, and we need a way to dynamically generate customers sitemap.xml pages.  In Java, you'd simply map a servlet to sitemap.xml, change the content type, and dynamically generate/retrieve whatever you want to spit out at requesting client.

Is there a way to do something similar in I've thought of a few possibilities, but i'm curious what the 'best practice' is.  Thanks in advance.
Vince Send private email
Thursday, April 06, 2006
Look into HttpHandlers. You give it an .ashx extension, and you implement one method to output whatever you want.

If you need a particular extension, you can map the name in IIS to the handler.
Chris Tavares Send private email
Thursday, April 06, 2006
A simpler way would be to have an .aspx page with no markup and in the code behind, change the response type then emit your xml using Response.Write.

cheap calls Send private email
Friday, April 07, 2006
Neither HttpHandlers nor an aspx page would help, because sitemap.xml is read directly from the disk - it is not requested from IIS.
You need to write a custom site map provider. Check this: .
smalltalk Send private email
Friday, April 07, 2006
Sorry, I thought you are referring to *the* web.sitemap file. If you are talking about generating a file that will be requested from outside, then definitely HttpHandlers are the answer.
smalltalk Send private email
Friday, April 07, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz