Intersoft ClientUI Documentation
How-to: Configure ASP.NET Server-side Upload Handler

The following example shows how to configure the server-side upload handler in an ASP.NET web project.

Example

Description

UXFileUpload is a pure client upload control that runs on both Silverlight and WPF platform. To use a file upload control, you need a server that store the files being uploaded from the client. You can use any type of servers to use UXFileUpload, such as ASP.NET, PHP and more.

In addition to the client-side implementation, ClientUI also includes a built-in ASP.NET server upload handler to accept the file upload requests from the UXFileUpload control.

Code

Configuring the ASP.NET server upload handler is straightforward. The first step is adding the required server-side assemblies to your project reference listed below:

Both of the assemblies can be found in the Add References dialog box. Alternatively, you can also find them in the installation program files folder.

The final step is adding the handler registration in the web configuration file of the project. Open the web.config file and add the following key.

To register the HTTP handler for IIS 6.0, use the following code.

Web.config
Copy Code
<configuration>
    <system.web>
        <httpHandlers>
            <add verb="*" path="UXFileUploadHandler.ashx"
                type="Intersoft.UXFileUpload.Server.UXFileUploadHandler, Intersoft.UXFileUpload.Server"/>
        </httpHandlers>
    </system.web>
</configuration>

To register the HTTP handler for IIS 7 running in integrated mode, use the following code.

Web.config
Copy Code
<configuration>
    <system.webServer>
        <handlers>
            <add name="UXFileUploadHandler" verb="*" path="UXFileUploadHandler.ashx"
                type="Intersoft.UXFileUpload.Server.UXFileUploadHandler, Intersoft.UXFileUpload.Server"/>
        </handlers>
    </system.webServer>
</configuration>
See Also

Concepts