Home
english
Home
WebDAV Server
WebDAV Client
WebDAV AJAX
Map Drive
Pricing
News
Contacts
info@ithit.com



Creating WebDAV HttpHandler

The following steps describe how to create HttpHandler and host your WebDAV server in IIS:

  1. Implement interfaces required for Class 1 server as described in Creating Class 1 WebDAV Server. Optionally you can implement Class 2, resumable upload and DeltaV support.
  2. Create your class derived from IHttpHandler:

     

    public class MyHttpHandler : IHttpHandler

    {

        public void ProcessRequest(HttpContext context)

        {

            context.Response.BufferOutput = false;

            // always create log file outside of the \bin folder if hosted in IIS\ASP.NET.

            FileLogger.LogFile = context.Request.PhysicalApplicationPath + "WebDAVlog.txt";

     

            WDEngine engine = new WDEngine();

            engine.Run(HttpContext.Current);

        }

    } 

     

    Make sure your log file is created outside of the \bin folder. If your logfile will be created in a \bin folder, your server will restart each time the logfile is updated, recycling application and session state.
  3. Create web application in IIS that will be the root of your WebDav server storage. Configure your web application to catch all WebDAV related verbs as described in Creating WebDAV Server Web Application in IIS.
  4. Place your dll file created in steep 1 and 2 and ITHit.WebDAV.Server.dll to the \bin folder of your web application.
  5. Place License.lic at the root of your WebDAV server. If you would like to store license in any other place read more at Reading the License.
  6. Place web.config file at the root of your application. In the web.config file set your HTTP handler class created in step 2 as the only HTTP handler of your application. Clear all other handlers:

    <httpHandlers>

    <clear />

    <add verb="*" path="*" type="MyNamespace.MyHttpHandler, MyDll" />

    </httpHandlers>

  7. Make sure your web application has enough permissions for creating a logfile. If any exceptions occur or the license file is not found the information will be logged to this file. Read more about logging here.

See Also:


What WebDAV software would you like to have?

Selected Customers:
Country: Norway
DnB NOR Group
Country: Finland
Bank of Finland
Country: United Kingdom
Bechtle Direct
Country: Sweden
BT Industries
Country: USA
California Chamber of Commerce
Country: Denmark
Danfoss Group
Country: Denmark
DFDS
Country: USA
Fluke Networks
Country: USA
HNI Corporation
Country: USA
IHS Inc
Country: USA
LandAmerica Financial Group
Country: Canada
Laurentian University
Country: USA
Microsoft
Country: Israel
RADVISION
Country: Ukraine
Raiffeisen Bank
Country: Netherlands
Sanoma Uitgevers
Country: USA
Siemens
Country: Australia
WorkCover NSW
Country: Ukraine
OTP Bank
Country: USA
Intel Corporation
Country: Austria
Austrian Federal Railways
Home WebDAV Server WebDAV Client WebDAV AJAX Map Drive Pricing News Contacts

Updated: Friday, November 14, 2008