public HttpResponseMessage ToggleURLHandler(ToggleUrlHandlerDTO dto) { var objModules = new Entities.Modules.ModuleController(); var objSettings = new SettingsInfo { MainSettings = objModules.GetModuleSettings(dto.ModuleId) }; var cfg = new ConfigUtils(); bool success; if (Utilities.IsRewriteLoaded()) { cfg.DisableRewriter(HttpContext.Current.Server.MapPath("~/web.config")); return Request.CreateResponse(HttpStatusCode.OK, "disabled"); } cfg.EnableRewriter(HttpContext.Current.Server.MapPath("~/web.config")); return Request.CreateResponse(HttpStatusCode.OK, "enabled"); }
public HttpResponseMessage ToggleURLHandler(ToggleUrlHandlerDTO dto) { var objModules = new Entities.Modules.ModuleController(); var objSettings = new SettingsInfo { MainSettings = objModules.GetModuleSettings(dto.ModuleId) }; var cfg = new ConfigUtils(); bool success; if (Utilities.IsRewriteLoaded()) { cfg.DisableRewriter(HttpContext.Current.Server.MapPath("~/web.config")); return(Request.CreateResponse(HttpStatusCode.OK, "disabled")); } cfg.EnableRewriter(HttpContext.Current.Server.MapPath("~/web.config")); return(Request.CreateResponse(HttpStatusCode.OK, "enabled")); }