示例#1
0
        public void Configuration(IAppBuilder app)
        {
            var path   = Path.Combine(Environment.CurrentDirectory, @"..\..\dav-store");
            var davCfg = new WebdavConfig(new Owin.Webdav.StaticDataStore(path))
            {
                AllowDirectoryBrowsing = true,
                Log = new TraceLog(System.Diagnostics.TraceLevel.Verbose)
            };

            //app.Map("/davroot", map =>
            //{
            //    map.Use<WebdavMiddleware>(davCfg);
            //});
            app.Use <WebdavMiddleware>(davCfg);
        }
示例#2
0
        public void Configuration(IAppBuilder app)
        {
            var path   = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, @"dav-store");
            var davCfg = new WebdavConfig(new Owin.Webdav.StaticDataStore(path))
            {
                AllowDirectoryBrowsing = true,
                Log = new TraceLog(System.Diagnostics.TraceLevel.Verbose)
            };

            //app.Map("/davroot", map =>
            //{
            //    map.Use<WebdavMiddleware>(davCfg);
            //});
            app.Use <WebdavMiddleware>(davCfg);
            // required to make sure requests don't get caught by IIS static file handler
            app.UseStageMarker(PipelineStage.MapHandler);
        }