示例#1
0
 public static void page_end(Websvc w)
 {
     Web.wp(w, "<hr>\n");
     if (w.ses != null)
     {
         Web.wp(w, "<p>WEBDAV:\n");
         string str1 = clib.make_url("http", Ini.host(), Ini.getint(En.webdav_port), "/");
         Web.wp(w, "<a href=\"{0}\">{0}</a>", (object)str1);
         Web.wp(w, " or ");
         string str2 = clib.make_url("https", Ini.host(), Ini.getint(En.webdav_port_ssl), "/");
         Web.wp(w, "<a href=\"{0}\">{0}</a>", (object)str2);
         Web.wp(w, "<BR>FTP:\n");
         string str3 = string.Format("ftp://{0}:{1}", (object)Ini.host(), (object)Ini.getint(En.ftp_port));
         Web.wp(w, "<a href=\"{0}\">{0}</a>", (object)str3);
         Web.wp(w, "<BR> Web Browser: ");
         string str4 = Ini.url_browse();
         Web.wp(w, "<a href=\"{0}\">{0}</a>", (object)str4);
         Web.wp(w, " or ");
         string str5 = clib.make_url("https", Ini.host(), Ini.getint(En.web_port_ssl), "/");
         Web.wp(w, "<a href=\"{0}\">{0}</a>", (object)str5);
         Web.wp(w, "<BR> <a href=\"http://netwinsite.com/ftpdav/guide.htm\">Guide to free WebDav/FTP Clients</a>");
     }
     Web.wp(w, "</div>");
 }
示例#2
0
 public static void startListeners()
 {
     clib.imsg("Creating tcpserver's...");
     MyMain.s_websvc    = new Websvc();
     MyMain.s_WebServer = new TcpServer((TcpServiceProvider)MyMain.s_websvc, Ini.getstring(En.bind), Ini.getint(En.web_port_ssl), true);
     MyMain.s_WebServer.Start();
     MyMain.webdavsvc          = new Websvc();
     MyMain.webdavsvc.iswebdav = true;
     MyMain.WebDavServer       = new TcpServer((TcpServiceProvider)MyMain.webdavsvc, Ini.getstring(En.bind), Ini.getint(En.webdav_port), false);
     MyMain.WebDavServer.Start();
     MyMain.s_webdavsvc          = new Websvc();
     MyMain.s_webdavsvc.iswebdav = true;
     MyMain.s_WebDavServer       = new TcpServer((TcpServiceProvider)MyMain.s_webdavsvc, Ini.getstring(En.bind), Ini.getint(En.webdav_port_ssl), true);
     if (!MyMain.s_WebDavServer.Start())
     {
         return;
     }
     MyMain.ftpservice = new FtpService();
     MyMain.ftpServer  = new TcpServer((TcpServiceProvider)MyMain.ftpservice, Ini.getstring(En.bind), Ini.getint(En.ftp_port), false);
     MyMain.ftpServer.Start();
     clib.imsg("Going to listeon on port {0} for http admin connections", (object)Ini.getint(En.web_port));
     MyMain.websvc    = new Websvc();
     MyMain.WebServer = new TcpServer((TcpServiceProvider)MyMain.websvc, Ini.getstring(En.bind), Ini.getint(En.web_port), false);
     if (!MyMain.WebServer.Start())
     {
         MyMain.WebServer = new TcpServer((TcpServiceProvider)MyMain.websvc, Ini.getstring(En.bind), Ini.getint(En.web_port) + 1, false);
         if (MyMain.WebServer.Start())
         {
             clib.imsg("Listing on next port worked.  So changing setting...");
             Ini.do_set(En.web_port, clib.int_to_string(Ini.getint(En.web_port) + 1));
         }
     }
     MyMain.websvc2    = new Websvc();
     MyMain.WebServer2 = new TcpServer((TcpServiceProvider)MyMain.websvc2, Ini.getstring(En.bind), 6080, false);
     MyMain.WebServer2.Start();
 }
示例#3
0
 public static string url_browse()
 {
     return(clib.make_url("http", Ini.host(), Ini.getint(En.web_port), "/"));
 }