This documentation is for the old version. Go to the latest Upload Suite docs

ASP.NET Samples

This topic discusses how to deploy ASP.NET demo applications on your server.


To find information about how specific application works, see the Samples by Application topic.

Installation Steps

ASP.NET demo applications are located at the following folders of the Image Uploader SDK:

  • Samples/ASPNET_CS and Samples/ASPNET_VB contain demo applications based on Image Uploader ASP.NET control usage and written in C# and VB.NET respectively. Read more about the ASP.NET control in the Inserting Image Uploader ASP.NET Control into ASP.NET Page topic.
  • Samples/ASPNET_IUEmbed_CS and Samples/ASPNET_IUEmbed_VB contain demo applications which use Image Uploader embedding scripts library to insert Image Uploader into a page. These samples are written in C# and VB.NET too.

So, to install ASP.NET demo applications just follow the steps below:

  1. Copy all files from the ASPNET_CS/ASPNET_VB or ASPNET_IUEmbed_CS/ASPNET_IUEmbed_VB folder to some directory on your web server.
  2. Make sure that the Gallery folder has enough permissions:
    • On Windows NT/2000/XP you should grant the modify permission to the Internet guest user (IUSR_<machinename>).
    • On Windows 2003 you should grant the modify permission to the NETWORK SERVICE group.
    • On Windows Vista and 2008 Server you should grant the modify permission to the account your site application pool is running under, Network Service by default.
  3. Run the browser and type the URL of the demo applications start page (default.aspx in the root of the ASPNET_CS/ASPNET_VB or ASPNET_IUEmbed_CS/ASPNET_IUEmbed_VB folder).

These demo applications can also be run on Mono platform (C# version only).


Problem with ../ Path

If you get the error that says that ../ (a parent path) is disallowed in the Server.MapPath method, go to the Internet Information Services -> Web Site Properties -> Home Directory -> Configuration... -> Options and set the Enable Parent Path checkbox.

Cannot Upload More than N Megabytes

The most typical reason of this problem is server-side limitation for maximum POST request length. As usual it is specified to reduce the risk of DoS attacks. If the request size exceeds specific value, it is considered as malicious and the upload is broken. As usual Image Uploader displays the following error message:

Upload failed (the connection was interrupted).

To resolve this problem you need to configure the settings of your server depending on its version.

For IIS 7:

  1. Go to C:\Windows\System32\inetsrv\config\applicationHost.config and change

    <section name="requestFiltering" overrideModeDefault="Deny" />


    <section name="requestFiltering" overrideModeDefault="Allow" />
  2. Add to your application's web.config the following sections:

                <requestLimits maxAllowedContentLength ="2147482624" /> <!-- in bytes -->
         <httpRuntime maxRequestLength="2097151"/> <!-- in kilobytes -->

For IIS 6:

    <httpRuntime maxRequestLength="2097151"/> <!-- in kilobytes -->

If you have URLScan installed and still experience this problem, go through the following steps:

  1. Open the UrlScan.ini file which is typically located at C:\Windows\system32\inetsrv\urlscan folder.
  2. Set the MaxAllowedContentLength key to the desired value.
  3. Save changes and restart IIS.

Additionally, to reduce the length of the POST request sent by Image Uploader use the FilesPerOnePackageCount which specifies a number of files to send in a single request.

Other Problems

If you still experience problems running demo applications, check out the Troubleshooting section. It contains information which may be helpful to resolve or diagnose them. Also, you can create support case or post a message on Image Uploader forum.

See Also