コード例 #1
0
        protected void Application_Start(Object sender, EventArgs e)
        {
            ServicePointManager.ServerCertificateValidationCallback
                += (ssender, cert, chain, sslPolicyErrors) => true;
            ServerConfig.Default.TimeoutSeconds = 10.0;

            String path = System.Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/ftsdata3/";

            System.IO.Directory.CreateDirectory(path);
            SDB.init(path);
        }
コード例 #2
0
ファイル: Global.asax.cs プロジェクト: zhaojinhai/ftserver-cs
        protected void Application_Start(Object sender, EventArgs e)
        {
            ServicePointManager.ServerCertificateValidationCallback
                += (ssender, cert, chain, sslPolicyErrors) => true;
            ServerConfig.Default.TimeoutSeconds = 20.0;
            bool isVM = false;

            String dir  = "/ftsdata9/";
            String path = System.Environment.GetFolderPath(Environment.SpecialFolder.Personal) + dir;

            try {
                System.IO.Directory.CreateDirectory(path);
            } catch (UnauthorizedAccessException) {
                isVM = true;
                path = this.Server.MapPath(dir);
                System.IO.Directory.CreateDirectory(path);
            }
            SDB.init(path, isVM);
        }
コード例 #3
0
ファイル: Global.asax.cs プロジェクト: zhaojinhai/ftserver-cs
 protected void Application_End(Object sender, EventArgs e)
 {
     SDB.close();
 }