1. <?xml version="1.0" encoding="utf-8"?>
  2. <configuration>
  3. <system.web>
  4. <httpHandlers>
  5. <add verb="*" path="*.xml" type="FooBar.XmlHandler, FooBar" />
  6. </httpHandlers>
  7. </system.web>
  8. </configuration>
  9.  
  10. namespace FooBar
  11. {
  12. public class XmlHandler : IHttpHandler
  13. {
  14. public bool IsReusable
  15. {
  16. get { return false; }
  17. }
  18.  
  19. public void ProcessRequest(HttpContext context)
  20. {
  21. HttpResponse Response = context.Response;
  22. Response.Write(xmlString);
  23. }
  24. }
  25. }