Exemple #1
0
 public DefaultStoreProvider(string storeRootPath, string directlyRootUrl, string username, string password)
     : this(storeRootPath, directlyRootUrl)
 {
     NetworkShareAccesser networkShareAccesser = new NetworkShareAccesser(storeRootPath, username, password);
     networkShareAccesser.Disconnect();
     networkShareAccesser.Connect();
 }
Exemple #2
0
        /// <summary>
        /// 构造函数(适用于访问UNC地址)
        /// </summary>
        /// <param name="storeRootPath">UNC共享目录</param>
        /// <param name="directlyRootUrl">直连地址根路径</param>
        /// <param name="username">访问UNC地址的用户名</param>
        /// <param name="password">访问UNC地址的密码</param>
        public DefaultStoreProvider(string storeRootPath, string directlyRootUrl, string username, string password)
            : this(storeRootPath, directlyRootUrl)
        {
            //连接网络共享目录,需要先释放之前的连接(如果有的话)
            NetworkShareAccesser acesser = new NetworkShareAccesser(storeRootPath, username, password);

            acesser.Disconnect();
            acesser.Connect();
        }