Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: How can I set the Content-Type ?

  1. #1
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default How can I set the Content-Type ?

    Greetings All,

    I'm calling an xmlpackage as follows :-
    http://mydomain.com/x-packagename.aspx

    I'd like the content type in the HTTP Response Header to be text/xml - but all I can get is text/html.

    The output method in the xmlpackage is set to xml - not quite sure what I'm missing here...

    (version ML 8.0.1.2 by the way)


    I'd be grateful for any suggestions.



    TTFN

    BFG

  2. #2
    mmcgeachy is offline Senior Member
    Join Date
    Sep 2008
    Posts
    174

    Default

    try adding this to inside the package tag.
    C#/VB.NET Code:
    <HTTPHeaders>
            <
    HTTPHeader headername="Content-Type" headervalue="text/xml" />
    </
    HTTPHeaders
    EntitySubMenu.xml.config is the prepackaged example I can find that in the code. If you want change how the code works look at the ExecXmlPackage class in App_Code\ASPDNSFHandlers.cs.

    Hope that helps

  3. #3
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Mate, that is awesome - Many Thanks !!


    TTFN

    BFG