Framework / Web Forms / Nevron HTTP Handlers Overview

In This Topic
    Nevron HTTP Handlers Overview
    In This Topic

    All AJAX features of the Nevron web controls require Visual Studio 2005 or later and Microsoft .NET Framework 2 with ASP.NET AJAX Framework 1.0 or Microsoft .NET Framework 3+.

     How are HTTP handlers utilized by the Nevron web controls

    Since version Q3 2007 all Nevron web controls make use of the HTTP handlers in both postback and AJAX modes. For details about HTTP handlers, please refer the Microsoft documentation at http://msdn2.microsoft.com/en-us/library/system.web.ihttphandler.aspx.

    Nevron uses HTTP handlers for image generation and streaming. Both Nevron Chart and Nevron Diagram register HTTP handlers in the web.config file. The names of the virtual files, used for HTTP handler invocation, are NevronChart.axd and NevronDiagram.axd.

    In postback mode a Nevron web control references the HTTP handler as the src-attribute of the HTML image element, rendered by the control. This way the image is rendered separately from the HTML code. Between the HTML and the image rendering, the state of the web control is stored in a session state object. After the image is rendered, the session state object is destroyed.

    The state management of the Nevron web controls in AJAX mode is the same as in postback mode, with the only difference that the session state object is not destroyed after image rendering, but is used as a permanent storage for the web control’s state.

    In AJAX mode Nevron web controls are designed to work both with the standard Microsoft AJAX callbacks and the alternative Nevron Instant Callback technology. The latter uses the HTTP handler to send asynchronous callbacks to the server by refreshing the chart/diagram image, providing a query string with encoded event data. Before producing an image, the HTTP handler calls a custom server side callback handler to let the developer process the event. Nevron Instant Callback provides improved productivity for tasks that do not require an image map or interaction with other web controls on the page, and no custom data has to be transmitted from the server to the client. It is the perfect solution when displaying auto refreshing, non-interactive charts and diagrams.

     Manual configuration

    By default Nevron web controls automatically register their corresponding HTTP handlers in the web.config. If for some reason a manual registration is required though, here is the XML code to place into the web.config, required to register the Nevron HTTP handlers:

    web.config
    Copy Code
    <configuration>
        ...
        <system.web>
            ...
            <httpHandlers>
                ...
                <!-- XML code, required by the Nevron Chart control -->
                <add verb="*" path="NevronChart.axd" type="Nevron.Chart.WebForm.NChartImageResourceHandler" validate="false"/>
    
                <!-- XML code, required by the Nevron Diagram control -->
                <add verb="*" path="NevronDiagram.axd" type="Nevron.Diagram.WebForm.NDiagramImageResourceHandler" validate="false"/>
    
                ...
            </httpHandlers>
            ...
        </system.web>
        ...
        <system.webServer>
        ...
            <validationvalidateIntegratedModeConfiguration="false"/>
                <handlers>
                    ...
                    <!-- If you are using Nevron Chart for .NET:-->
                    <remove name="NevronChart"/>
                    <!-- If you are using Nevron Diagram for .NET:-->
                    <remove name="NevronDiagram"/>
                    ...
                    <!-- If you are using Nevron Chart for .NET:-->
                    <add name="NevronChart" preCondition="integratedMode" verb="*" path="NevronChart.axd" type="Nevron.Chart.WebForm.NChartImageResourceHandler"/>
                    <!-- If you are using Nevron Diagram for .NET:-->
                    <add name=" NevronDiagram" preCondition="integratedMode" verb="*" path=" NevronDiagram.axd" type="Nevron.Diagram.WebForm.NDiagramImageResourceHandler"/>
                    ...
            </handlers>
            ...
        </system.webServer>
        ...
    </configuration>
    
    See Also