Example #1
0
        /// <summary>
        /// Starts the WebDAV server.
        /// </summary>
        /// <returns>The <see cref="WebDavServer"/></returns>
        internal static WebDavServer StartWebDavServer()
        {
            var server = new WebDavServer(new WebDavDiskStore(WebDavConfig.WebDavLocalPath));
            server.Start(WebDavConfig.WebDavUri.ToString());

            return server;
        }
        /// <summary>
        ///     This method is called when the service gets a request to start.
        /// </summary>
        /// <param name="args">Any command line arguments</param>
        public void OnStart(string[] args)
        {
#if DEBUG
            NameValueCollection properties = new NameValueCollection {["showDateTime"] = "true"};
            LogManager.Adapter = new ConsoleOutLoggerFactoryAdapter(properties);
#endif
            IWebDavStoreItemLock lockSystem = new WebDavSqlStoreItemLock();
            IWebDavStore store = new WebDavSqlStore("\\Data", new Guid("00000000-0000-0000-0000-000000000000"), lockSystem);
            WebDavServer server = new WebDavServer(ref store, AuthType.Negotiate);

            server.Start(Url);
        }
Example #3
0
 /// <summary>
 /// Starts the server.
 /// Authentication used: Negotiate
 /// </summary>
 private static void StartServer()
 {
     IWebDavStoreItemLock lockSystem = new WebDavStoreItemLock();
     IWebDavStore store = new WebDavDiskStore(Localpath, lockSystem);
     WebDavServer server = new WebDavServer(ref store);
     server.Start(Url);
 }