The Hoju Saram

Friday, August 24, 2007

.Net SQL Backend storage with Activex Uploader

Firstly : This solution uses an ActiveX control , so it is targetted at Intranet Applications for SOEs where IE is the standard browser.

In my previous post I talked about implementing the domino inotes activex uploader to talk to an asp .net application that could store the uploaded files in a sql database, well here is the C# vs2005 solution.

I am sure there are other activex file uploaders out there that provide similar (probably better) functionality but I knew how this one worked from previous work I had done with it in Domino using a java servlet to receive the files.

Basically in this solution I re-coded the servlet as a Httpmodule that read the request inputstream and processed the data coming from the activex control. The activex control thinks it is talking to a Domino Server, so the code is based around getting the functionality out of the control while tricking it into thinking it is being used with a Domino Backend. In fact the backend is the .net application which stores the uploaded files into the sql database.

The setup is as usually for my solutions. Just create a new sql database on your sql server/msde and run the DBSetup.sql code against it. Then edit the web.config so the connection string matches your database. Once that is done compile and run. The cab file that contains the activex control is in the project.

The inotes ActiveX control provides the following features:

  • Drag and drop functionality from windows explorer/desktop
  • File upload status bar
  • Multiple file upload and deletions
  • Each file upload uses an individual HTTP POST so upload limit is per file
  • Windows explorer look and feel.
  • Client side caching

Happy coding.

Labels: ,


Post a Comment

Links to this post:

Create a Link

<< Home