HttpHandler Question

Discussion in 'ASP .Net' started by digitalcolony, Jun 14, 2007.

  1. I had the .XML extension mapped to the ASP.NET DLL. And then I
    updated the web.config as such.

    <httpHandlers>
    <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/
    >


    And it works!

    However, if the browser makes a request for any other XML file, it
    fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    anyway to get XML files on the server to render if that extension is
    mapped to the ASP.NET DLL?

    thanks - MAS
     
    digitalcolony, Jun 14, 2007
    #1
    1. Advertising

  2. re:
    !> Is there anyway to get XML files on the server to render
    !> if that extension is mapped to the ASP.NET DLL?

    Have you considered using an .xsl file, instead of mapping XML files to the ASP.NET dll ?



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "digitalcolony" <> wrote in message
    news:...
    >I had the .XML extension mapped to the ASP.NET DLL. And then I
    > updated the web.config as such.
    >
    > <httpHandlers>
    > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/
    >>

    >
    > And it works!
    >
    > However, if the browser makes a request for any other XML file, it
    > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > anyway to get XML files on the server to render if that extension is
    > mapped to the ASP.NET DLL?
    >
    > thanks - MAS
    >
     
    Juan T. Llibre, Jun 14, 2007
    #2
    1. Advertising

  3. I was building a sitemap.xml file for Google. I suppose I could use
    another extension, but I was interested if there was a way to have a
    HTTPHandler process one file and then have ASP.NET DLL dish up the XML
    files on the file server as if it were IIS (correctly).

    Possible?

    MAS

    On Jun 14, 11:28 am, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> Is there anyway to get XML files on the server to render
    > !> if that extension is mapped to the ASP.NET DLL?
    >
    > Have you considered using an .xsl file, instead of mapping XML files to the ASP.NET dll ?
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================"digitalcolony" <> wrote in message
    >
    > news:...
    >
    > >I had the .XML extension mapped to the ASP.NET DLL. And then I
    > > updated the web.config as such.

    >
    > > <httpHandlers>
    > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/

    >
    > > And it works!

    >
    > > However, if the browser makes a request for any other XML file, it
    > > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > > anyway to get XML files on the server to render if that extension is
    > > mapped to the ASP.NET DLL?

    >
    > > thanks - MAS
     
    digitalcolony, Jun 14, 2007
    #3
  4. re:
    !> I was building a sitemap.xml file for Google.
    !> I suppose I could use another extension

    Maybe I wasn't clear enough...or I don't understand your question well enough.

    If you write a sitemap.xsl file for sitemap.xml, and link to sitemap.xml, it will be rendered
    automatically, without the need to map the XML extension to the aspnet_isapi dll.

    Of course if, in spite of that, you still want to find a way to do that rendering by
    mapping XML files to the aspnet_isapi dll, you are perfectly free to pursue that.

    If you *only* want to build a sitemap.xml file for Google, you don't have to render it.
    Google can read it without needing it to be rendered.




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "digitalcolony" <> wrote in message
    news:...
    I was building a sitemap.xml file for Google. I suppose I could use
    another extension, but I was interested if there was a way to have a
    HTTPHandler process one file and then have ASP.NET DLL dish up the XML
    files on the file server as if it were IIS (correctly).

    Possible?

    MAS

    On Jun 14, 11:28 am, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> Is there anyway to get XML files on the server to render
    > !> if that extension is mapped to the ASP.NET DLL?
    >
    > Have you considered using an .xsl file, instead of mapping XML files to the ASP.NET dll ?
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================"digitalcolony" <> wrote in message
    >
    > news:...
    >
    > >I had the .XML extension mapped to the ASP.NET DLL. And then I
    > > updated the web.config as such.

    >
    > > <httpHandlers>
    > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/

    >
    > > And it works!

    >
    > > However, if the browser makes a request for any other XML file, it
    > > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > > anyway to get XML files on the server to render if that extension is
    > > mapped to the ASP.NET DLL?

    >
    > > thanks - MAS
     
    Juan T. Llibre, Jun 14, 2007
    #4
  5. The purpose of the handler is to have C# generate a real-time dynamic
    XML file.

    Just to be clear, the Handler works. What doesn't work is the ability
    to see other XML files, even though the HTTP Handler only intercepts
    the request for sitemap.xml.

    MAS




    On Jun 14, 11:49 am, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> I was building a sitemap.xml file for Google.
    > !> I suppose I could use another extension
    >
    > Maybe I wasn't clear enough...or I don't understand your question well enough.
    >
    > If you write a sitemap.xsl file for sitemap.xml, and link to sitemap.xml, it will be rendered
    > automatically, without the need to map the XML extension to the aspnet_isapi dll.
    >
    > Of course if, in spite of that, you still want to find a way to do that rendering by
    > mapping XML files to the aspnet_isapi dll, you are perfectly free to pursue that.
    >
    > If you *only* want to build a sitemap.xml file for Google, you don't have to render it.
    > Google can read it without needing it to be rendered.
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================"digitalcolony" <> wrote in message
    >
    > news:...
    > I was building a sitemap.xml file for Google. I suppose I could use
    > another extension, but I was interested if there was a way to have a
    > HTTPHandler process one file and then have ASP.NET DLL dish up the XML
    > files on the file server as if it were IIS (correctly).
    >
    > Possible?
    >
    > MAS
    >
    > On Jun 14, 11:28 am, "Juan T. Llibre" <>
    > wrote:
    >
    > > re:
    > > !> Is there anyway to get XML files on the server to render
    > > !> if that extension is mapped to the ASP.NET DLL?

    >
    > > Have you considered using an .xsl file, instead of mapping XML files to the ASP.NET dll ?

    >
    > > Juan T. Llibre, asp.net MVP
    > > asp.net faq :http://asp.net.do/faq/
    > > foros de asp.net, en español :http://asp.net.do/foros/
    > > ======================================"digitalcolony" <> wrote in message

    >
    > >news:...

    >
    > > >I had the .XML extension mapped to the ASP.NET DLL. And then I
    > > > updated the web.config as such.

    >
    > > > <httpHandlers>
    > > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/

    >
    > > > And it works!

    >
    > > > However, if the browser makes a request for any other XML file, it
    > > > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > > > anyway to get XML files on the server to render if that extension is
    > > > mapped to the ASP.NET DLL?

    >
    > > > thanks - MAS
     
    digitalcolony, Jun 14, 2007
    #5
  6. re:
    !> Just to be clear, the Handler works. What doesn't work is the ability
    !> to see other XML files, even though the HTTP Handler only intercepts
    !> the request for sitemap.xml.

    What happens if you map a wildcard ?

    <add verb="*" path="*.xml" type="HttpExtensions.SitemapHandler"/>



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "digitalcolony" <> wrote in message
    news:...
    The purpose of the handler is to have C# generate a real-time dynamic
    XML file.

    Just to be clear, the Handler works. What doesn't work is the ability
    to see other XML files, even though the HTTP Handler only intercepts
    the request for sitemap.xml.

    MAS




    On Jun 14, 11:49 am, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> I was building a sitemap.xml file for Google.
    > !> I suppose I could use another extension
    >
    > Maybe I wasn't clear enough...or I don't understand your question well enough.
    >
    > If you write a sitemap.xsl file for sitemap.xml, and link to sitemap.xml, it will be rendered
    > automatically, without the need to map the XML extension to the aspnet_isapi dll.
    >
    > Of course if, in spite of that, you still want to find a way to do that rendering by
    > mapping XML files to the aspnet_isapi dll, you are perfectly free to pursue that.
    >
    > If you *only* want to build a sitemap.xml file for Google, you don't have to render it.
    > Google can read it without needing it to be rendered.
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================"digitalcolony" <> wrote in message
    >
    > news:...
    > I was building a sitemap.xml file for Google. I suppose I could use
    > another extension, but I was interested if there was a way to have a
    > HTTPHandler process one file and then have ASP.NET DLL dish up the XML
    > files on the file server as if it were IIS (correctly).
    >
    > Possible?
    >
    > MAS
    >
    > On Jun 14, 11:28 am, "Juan T. Llibre" <>
    > wrote:
    >
    > > re:
    > > !> Is there anyway to get XML files on the server to render
    > > !> if that extension is mapped to the ASP.NET DLL?

    >
    > > Have you considered using an .xsl file, instead of mapping XML files to the ASP.NET dll ?

    >
    > > Juan T. Llibre, asp.net MVP
    > > asp.net faq :http://asp.net.do/faq/
    > > foros de asp.net, en español :http://asp.net.do/foros/
    > > ======================================"digitalcolony" <> wrote in message

    >
    > >news:...

    >
    > > >I had the .XML extension mapped to the ASP.NET DLL. And then I
    > > > updated the web.config as such.

    >
    > > > <httpHandlers>
    > > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/

    >
    > > > And it works!

    >
    > > > However, if the browser makes a request for any other XML file, it
    > > > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > > > anyway to get XML files on the server to render if that extension is
    > > > mapped to the ASP.NET DLL?

    >
    > > > thanks - MAS
     
    Juan T. Llibre, Jun 14, 2007
    #6
  7. Every XML request would go to the HTTP Handler code, which I don't
    want.

    The XML for the sitemap is generated by me.
    The XML for the blog is generated by a 3rd party tool.

    So I only want the HTTP Handler to process the sitemap request.

    If I can just get the ASP.NET DLL to kick the additional XML requests
    back to the browser without generating an error that would be ideal.
    However, whereas IIS can render XML requests to the browser fine, the
    ASP.NET DLL can't.

    MAS


    On Jun 14, 12:07 pm, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> Just to be clear, the Handler works. What doesn't work is the ability
    > !> to see other XML files, even though the HTTP Handler only intercepts
    > !> the request for sitemap.xml.
    >
    > What happens if you map a wildcard ?
    >
    > <add verb="*" path="*.xml" type="HttpExtensions.SitemapHandler"/>
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================"digitalcolony" <> wrote in message
    >
    > news:...
    > The purpose of the handler is to have C# generate a real-time dynamic
    > XML file.
    >
    > Just to be clear, the Handler works. What doesn't work is the ability
    > to see other XML files, even though the HTTP Handler only intercepts
    > the request for sitemap.xml.
    >
    > MAS
    >
    > On Jun 14, 11:49 am, "Juan T. Llibre" <>
    > wrote:
    >
    > > re:
    > > !> I was building a sitemap.xml file for Google.
    > > !> I suppose I could use another extension

    >
    > > Maybe I wasn't clear enough...or I don't understand your question well enough.

    >
    > > If you write a sitemap.xsl file for sitemap.xml, and link to sitemap.xml, it will be rendered
    > > automatically, without the need to map the XML extension to the aspnet_isapi dll.

    >
    > > Of course if, in spite of that, you still want to find a way to do that rendering by
    > > mapping XML files to the aspnet_isapi dll, you are perfectly free to pursue that.

    >
    > > If you *only* want to build a sitemap.xml file for Google, you don't have to render it.
    > > Google can read it without needing it to be rendered.

    >
    > > Juan T. Llibre, asp.net MVP
    > > asp.net faq :http://asp.net.do/faq/
    > > foros de asp.net, en español :http://asp.net.do/foros/
    > > ======================================"digitalcolony" <> wrote in message

    >
    > >news:...
    > > I was building a sitemap.xml file for Google. I suppose I could use
    > > another extension, but I was interested if there was a way to have a
    > > HTTPHandler process one file and then have ASP.NET DLL dish up the XML
    > > files on the file server as if it were IIS (correctly).

    >
    > > Possible?

    >
    > > MAS

    >
    > > On Jun 14, 11:28 am, "Juan T. Llibre" <>
    > > wrote:

    >
    > > > re:
    > > > !> Is there anyway to get XML files on the server to render
    > > > !> if that extension is mapped to the ASP.NET DLL?

    >
    > > > Have you considered using an .xsl file, instead of mapping XML files to the ASP.NET dll ?

    >
    > > > Juan T. Llibre, asp.net MVP
    > > > asp.net faq :http://asp.net.do/faq/
    > > > foros de asp.net, en español :http://asp.net.do/foros/
    > > > ======================================"digitalcolony" <> wrote in message

    >
    > > >news:...

    >
    > > > >I had the .XML extension mapped to the ASP.NET DLL. And then I
    > > > > updated the web.config as such.

    >
    > > > > <httpHandlers>
    > > > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/

    >
    > > > > And it works!

    >
    > > > > However, if the browser makes a request for any other XML file, it
    > > > > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > > > > anyway to get XML files on the server to render if that extension is
    > > > > mapped to the ASP.NET DLL?

    >
    > > > > thanks - MAS
     
    digitalcolony, Jun 14, 2007
    #7
  8. If you'll excuse a light-hearted moment, what you seek reminds me of :

    "To dream the impossible dream
    To fight the unbeatable foe
    To bear with unbearable sorrow
    To run where the brave dare not go..."

    :)



    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ======================================
    "digitalcolony" <> wrote in message
    news:...
    Every XML request would go to the HTTP Handler code, which I don't
    want.

    The XML for the sitemap is generated by me.
    The XML for the blog is generated by a 3rd party tool.

    So I only want the HTTP Handler to process the sitemap request.

    If I can just get the ASP.NET DLL to kick the additional XML requests
    back to the browser without generating an error that would be ideal.
    However, whereas IIS can render XML requests to the browser fine, the
    ASP.NET DLL can't.

    MAS


    On Jun 14, 12:07 pm, "Juan T. Llibre" <>
    wrote:
    > re:
    > !> Just to be clear, the Handler works. What doesn't work is the ability
    > !> to see other XML files, even though the HTTP Handler only intercepts
    > !> the request for sitemap.xml.
    >
    > What happens if you map a wildcard ?
    >
    > <add verb="*" path="*.xml" type="HttpExtensions.SitemapHandler"/>
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================"digitalcolony" <> wrote in message
    >
    > news:...
    > The purpose of the handler is to have C# generate a real-time dynamic
    > XML file.
    >
    > Just to be clear, the Handler works. What doesn't work is the ability
    > to see other XML files, even though the HTTP Handler only intercepts
    > the request for sitemap.xml.
    >
    > MAS
    >
    > On Jun 14, 11:49 am, "Juan T. Llibre" <>
    > wrote:
    >
    > > re:
    > > !> I was building a sitemap.xml file for Google.
    > > !> I suppose I could use another extension

    >
    > > Maybe I wasn't clear enough...or I don't understand your question well enough.

    >
    > > If you write a sitemap.xsl file for sitemap.xml, and link to sitemap.xml, it will be rendered
    > > automatically, without the need to map the XML extension to the aspnet_isapi dll.

    >
    > > Of course if, in spite of that, you still want to find a way to do that rendering by
    > > mapping XML files to the aspnet_isapi dll, you are perfectly free to pursue that.

    >
    > > If you *only* want to build a sitemap.xml file for Google, you don't have to render it.
    > > Google can read it without needing it to be rendered.

    >
    > > Juan T. Llibre, asp.net MVP
    > > asp.net faq :http://asp.net.do/faq/
    > > foros de asp.net, en español :http://asp.net.do/foros/
    > > ======================================"digitalcolony" <> wrote in message

    >
    > >news:...
    > > I was building a sitemap.xml file for Google. I suppose I could use
    > > another extension, but I was interested if there was a way to have a
    > > HTTPHandler process one file and then have ASP.NET DLL dish up the XML
    > > files on the file server as if it were IIS (correctly).

    >
    > > Possible?

    >
    > > MAS

    >
    > > On Jun 14, 11:28 am, "Juan T. Llibre" <>
    > > wrote:

    >
    > > > re:
    > > > !> Is there anyway to get XML files on the server to render
    > > > !> if that extension is mapped to the ASP.NET DLL?

    >
    > > > Have you considered using an .xsl file, instead of mapping XML files to the ASP.NET dll ?

    >
    > > > Juan T. Llibre, asp.net MVP
    > > > asp.net faq :http://asp.net.do/faq/
    > > > foros de asp.net, en español :http://asp.net.do/foros/
    > > > ======================================"digitalcolony" <> wrote in
    > > > message

    >
    > > >news:...

    >
    > > > >I had the .XML extension mapped to the ASP.NET DLL. And then I
    > > > > updated the web.config as such.

    >
    > > > > <httpHandlers>
    > > > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/

    >
    > > > > And it works!

    >
    > > > > However, if the browser makes a request for any other XML file, it
    > > > > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > > > > anyway to get XML files on the server to render if that extension is
    > > > > mapped to the ASP.NET DLL?

    >
    > > > > thanks - MAS
     
    Juan T. Llibre, Jun 14, 2007
    #8
  9. Love the ELVIS reference.

    My final solution was to create a 2nd HTTP Handler that catches all
    other XML requests and streams them back to the browser as "text/xml".


    MAS





    On Jun 14, 1:07 pm, "Juan T. Llibre" <>
    wrote:
    > If you'll excuse a light-hearted moment, what you seek reminds me of :
    >
    > "To dream the impossible dream
    > To fight the unbeatable foe
    > To bear with unbearable sorrow
    > To run where the brave dare not go..."
    >
    > :)
    >
    > Juan T. Llibre, asp.net MVP
    > asp.net faq :http://asp.net.do/faq/
    > foros de asp.net, en español :http://asp.net.do/foros/
    > ======================================"digitalcolony" <> wrote in message
    >
    > news:...
    > Every XML request would go to the HTTP Handler code, which I don't
    > want.
    >
    > The XML for the sitemap is generated by me.
    > The XML for the blog is generated by a 3rd party tool.
    >
    > So I only want the HTTP Handler to process the sitemap request.
    >
    > If I can just get the ASP.NET DLL to kick the additional XML requests
    > back to the browser without generating an error that would be ideal.
    > However, whereas IIS can render XML requests to the browser fine, the
    > ASP.NET DLL can't.
    >
    > MAS
    >
    > On Jun 14, 12:07 pm, "Juan T. Llibre" <>
    > wrote:
    >
    > > re:
    > > !> Just to be clear, the Handler works. What doesn't work is the ability
    > > !> to see other XML files, even though the HTTP Handler only intercepts
    > > !> the request for sitemap.xml.

    >
    > > What happens if you map a wildcard ?

    >
    > > <add verb="*" path="*.xml" type="HttpExtensions.SitemapHandler"/>

    >
    > > Juan T. Llibre, asp.net MVP
    > > asp.net faq :http://asp.net.do/faq/
    > > foros de asp.net, en español :http://asp.net.do/foros/
    > > ======================================"digitalcolony" <> wrote in message

    >
    > >news:...
    > > The purpose of the handler is to have C# generate a real-time dynamic
    > > XML file.

    >
    > > Just to be clear, the Handler works. What doesn't work is the ability
    > > to see other XML files, even though the HTTP Handler only intercepts
    > > the request for sitemap.xml.

    >
    > > MAS

    >
    > > On Jun 14, 11:49 am, "Juan T. Llibre" <>
    > > wrote:

    >
    > > > re:
    > > > !> I was building a sitemap.xml file for Google.
    > > > !> I suppose I could use another extension

    >
    > > > Maybe I wasn't clear enough...or I don't understand your question well enough.

    >
    > > > If you write a sitemap.xsl file for sitemap.xml, and link to sitemap.xml, it will be rendered
    > > > automatically, without the need to map the XML extension to the aspnet_isapi dll.

    >
    > > > Of course if, in spite of that, you still want to find a way to do that rendering by
    > > > mapping XML files to the aspnet_isapi dll, you are perfectly free to pursue that.

    >
    > > > If you *only* want to build a sitemap.xml file for Google, you don't have to render it.
    > > > Google can read it without needing it to be rendered.

    >
    > > > Juan T. Llibre, asp.net MVP
    > > > asp.net faq :http://asp.net.do/faq/
    > > > foros de asp.net, en español :http://asp.net.do/foros/
    > > > ======================================"digitalcolony" <> wrote in message

    >
    > > >news:...
    > > > I was building a sitemap.xml file for Google. I suppose I could use
    > > > another extension, but I was interested if there was a way to have a
    > > > HTTPHandler process one file and then have ASP.NET DLL dish up the XML
    > > > files on the file server as if it were IIS (correctly).

    >
    > > > Possible?

    >
    > > > MAS

    >
    > > > On Jun 14, 11:28 am, "Juan T. Llibre" <>
    > > > wrote:

    >
    > > > > re:
    > > > > !> Is there anyway to get XML files on the server to render
    > > > > !> if that extension is mapped to the ASP.NET DLL?

    >
    > > > > Have you considered using an .xsl file, instead of mapping XML files to the ASP.NET dll ?

    >
    > > > > Juan T. Llibre, asp.net MVP
    > > > > asp.net faq :http://asp.net.do/faq/
    > > > > foros de asp.net, en español :http://asp.net.do/foros/
    > > > > ======================================"digitalcolony" <> wrote in
    > > > > message

    >
    > > > >news:...

    >
    > > > > >I had the .XML extension mapped to the ASP.NET DLL. And then I
    > > > > > updated the web.config as such.

    >
    > > > > > <httpHandlers>
    > > > > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/

    >
    > > > > > And it works!

    >
    > > > > > However, if the browser makes a request for any other XML file, it
    > > > > > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > > > > > anyway to get XML files on the server to render if that extension is
    > > > > > mapped to the ASP.NET DLL?

    >
    > > > > > thanks - MAS
     
    digitalcolony, Jun 14, 2007
    #9
  10. digitalcolony

    bruce barker Guest

    try:

    <httpHandlers>
    <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/>
    <add verb="*" path="*.xml" type="HSystem.Web.DefaultHttpHandler"/>

    -- bruce (sqlwork.com)


    digitalcolony wrote:
    > I had the .XML extension mapped to the ASP.NET DLL. And then I
    > updated the web.config as such.
    >
    > <httpHandlers>
    > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/
    >
    > And it works!
    >
    > However, if the browser makes a request for any other XML file, it
    > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > anyway to get XML files on the server to render if that extension is
    > mapped to the ASP.NET DLL?
    >
    > thanks - MAS
    >
     
    bruce barker, Jun 14, 2007
    #10
  11. That was it Bruce!

    An extra H was in your answer, but I figured it out.

    <add verb="*" path="*.xml" type="System.Web.DefaultHttpHandler"/>

    thanks!!!
    MAS

    On Jun 14, 1:28 pm, bruce barker <> wrote:
    > try:
    >
    > <httpHandlers>
    > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/>
    > <add verb="*" path="*.xml" type="HSystem.Web.DefaultHttpHandler"/>
    >
    > -- bruce (sqlwork.com)
    >
    > digitalcolony wrote:
    > > I had the .XML extension mapped to the ASP.NET DLL. And then I
    > > updated the web.config as such.

    >
    > > <httpHandlers>
    > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/

    >
    > > And it works!

    >
    > > However, if the browser makes a request for any other XML file, it
    > > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > > anyway to get XML files on the server to render if that extension is
    > > mapped to the ASP.NET DLL?

    >
    > > thanks - MAS
     
    digitalcolony, Jun 14, 2007
    #11
  12. I spoke too soon. That works inside Visual Studio 2005, but not via
    IIS, since the default HTTP HAndler has now been remapped.

    I ended up writing my own catch all.

    MAS



    On Jun 14, 1:42 pm, digitalcolony <> wrote:
    > That was it Bruce!
    >
    > An extra H was in your answer, but I figured it out.
    >
    > <add verb="*" path="*.xml" type="System.Web.DefaultHttpHandler"/>
    >
    > thanks!!!
    > MAS
    >
    > On Jun 14, 1:28 pm, bruce barker <> wrote:
    >
    > > try:

    >
    > > <httpHandlers>
    > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/>
    > > <add verb="*" path="*.xml" type="HSystem.Web.DefaultHttpHandler"/>

    >
    > > -- bruce (sqlwork.com)

    >
    > > digitalcolony wrote:
    > > > I had the .XML extension mapped to the ASP.NET DLL. And then I
    > > > updated the web.config as such.

    >
    > > > <httpHandlers>
    > > > <add verb="*" path="sitemap.xml" type="HttpExtensions.SitemapHandler"/

    >
    > > > And it works!

    >
    > > > However, if the browser makes a request for any other XML file, it
    > > > fails. My guess is the ASP.NET DLL can't render .XML files. Is there
    > > > anyway to get XML files on the server to render if that extension is
    > > > mapped to the ASP.NET DLL?

    >
    > > > thanks - MAS
     
    digitalcolony, Jun 14, 2007
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David J. Berman

    Re: HttpHandler for images and browser behavior

    David J. Berman, Jun 24, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    3,143
    David J. Berman
    Jun 24, 2003
  2. Lloyd Dupont

    HttpHandler not working :-)

    Lloyd Dupont, Jul 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    470
    Lloyd Dupont
    Jul 14, 2003
  3. DalePres

    custom HttpHandler question

    DalePres, May 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    515
    Natty Gur
    May 10, 2004
  4. David Bowey
    Replies:
    6
    Views:
    5,930
    fd123456
    Mar 7, 2005
  5. preport

    HttpHandler Question

    preport, Mar 14, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    342
    preport
    Mar 15, 2006
Loading...

Share This Page