private byte[] DoIIS_Export(byte[] ParameterData) { IISLogCheck _l = new IISLogCheck(); string _type = CommandCommon.GetParamDataObj <string>(ParameterData); return(_l.GetLogData(_type)); }
private byte[] DoSystemTaskExport(byte[] ParameterData) { SystemTaskCheck _l = new SystemTaskCheck(); string _type = CommandCommon.GetParamDataObj <string>(ParameterData); return(_l.GetLogData(_type)); }
private byte[] RemoveAppPlugin(byte[] ParameterData) { AppPluginInfo _api = CommandCommon.GetParamDataObj <AppPluginInfo>(ParameterData); string _ret = ServerPluginService.RemovePlugin(_api); byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }
private byte[] UpLoadFilePlugin(byte[] ParameterData) { UpLoadFileInfo _ufi = CommandCommon.GetParamDataObj <UpLoadFileInfo>(ParameterData); string _ret = ServerFileCommon.UpLoad(_ufi); byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }
private byte[] DoDBConn_Del(byte[] ParameterData) { string _dbs = CommandCommon.GetParamDataObj <string>(ParameterData); Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); ConnectionStringsSection connSetting = (ConnectionStringsSection)cfa.ConnectionStrings; connSetting.ConnectionStrings.Remove(_dbs); cfa.Save(); ConfigurationManager.RefreshSection("connectionStrings"); string _ret = "TRUE"; byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }
private byte[] LoadAppPlugin(byte[] ParameterData) { string _ret = ""; AppPluginInfo _api = CommandCommon.GetParamDataObj <AppPluginInfo>(ParameterData); //将正确版本插件DLL复制到运行目录 //加载插件 _ret = ServerPluginService.LoadAppPlugin(_api); byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }
private byte[] DoSaveBlockedList(byte[] ParameterData) { string _str = CommandCommon.GetParamDataObj <string>(ParameterData); string blockedListfn = Utils.ExeDir + "IISBlockedList.dat"; if (File.Exists(blockedListfn)) { File.Delete(blockedListfn); } File.WriteAllText(blockedListfn, _str); string _ret = "TRUE"; TaskList.RunTaskImmediately("SystemSelfCheck"); byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }
private byte[] DoWCFService_Del(byte[] ParameterData) { string _wss = CommandCommon.GetParamDataObj <string>(ParameterData); Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); CheckWCFServiceConfigSection CurrentSeviceList = (CheckWCFServiceConfigSection)cfa.GetSection("CheckWCFServiceList"); CurrentSeviceList.PluginCollection.Remove(_wss); cfa.Save(); ConfigurationManager.RefreshSection("CheckWCFServiceList"); string _ret = "TRUE"; TaskList.RunTaskImmediately("SystemSelfCheck"); byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }
private byte[] DoDBConn_Add(byte[] ParameterData) { dynamic _dbs = CommandCommon.GetParamDataObj <ExpandoObject>(ParameterData); Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); ConnectionStringsSection connSetting = (ConnectionStringsSection)cfa.ConnectionStrings; ConnectionStringSettings _st = new ConnectionStringSettings(); _st.ConnectionString = _dbs.ConnectionString; _st.ProviderName = _dbs.ConnectionType; _st.Name = _dbs.ConnectionName; connSetting.ConnectionStrings.Add(_st); cfa.Save(); ConfigurationManager.RefreshSection("connectionStrings"); string _ret = "TRUE"; byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }
private byte[] DoWinService_Add(byte[] ParameterData) { WinServiceStatus _wss = CommandCommon.GetParamDataObj <WinServiceStatus>(ParameterData); Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); CheckWinServiceConfigSection CurrentSeviceList = (CheckWinServiceConfigSection)cfa.GetSection("CheckWinServiceList"); CheckWinServiceConfigurationElement _new = new CheckWinServiceConfigurationElement(); _new.Name = _wss.ServiceName; _new.Description = _wss.Description; CurrentSeviceList.PluginCollection.Add(_new); cfa.Save(); ConfigurationManager.RefreshSection("CheckWinServiceList"); string _ret = "TRUE"; TaskList.RunTaskImmediately("SystemSelfCheck"); byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }
private byte[] DoSystemLogExport(byte[] ParameterData) { string _str = CommandCommon.GetParamDataObj <string>(ParameterData); string[] _cstr = _str.Split('.'); switch (_cstr[0]) { case "SystemLogCheck": SystemLogCheck _l = new SystemLogCheck(); return(_l.GetLogData(_cstr[1])); case "QueryLogCheck": QueryLogCheck _q = new QueryLogCheck(); return(_q.GetLogData(_cstr[1])); case "UserLogCheck": UserLogCheck _u = new UserLogCheck(); return(_u.GetLogData(_cstr[1])); default: return(null); } }