/// <summary> /// Try to write web.config file /// </summary> /// <returns></returns> protected virtual bool TryWriteWebConfig() { try { _fileProvider.SetLastWriteTimeUtc(_fileProvider.MapPath(NopInfrastructureDefaults.WebConfigPath), DateTime.UtcNow); try { _fileProvider.SetLastWriteTimeUtc(_fileProvider.MapPath(NopInfrastructureDefaults.AppSettingPath), DateTime.UtcNow); } #pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body catch { } #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body return(true); } catch { return(false); } }
/// <summary> /// Try to write web.config file /// </summary> /// <returns></returns> protected virtual bool TryWriteWebConfig() { try { _fileProvider.SetLastWriteTimeUtc(_fileProvider.MapPath(NopInfrastructureDefaults.WebConfigPath), DateTime.UtcNow); return(true); } catch { return(false); } }
/// <summary> /// Try to write web.config file /// </summary> /// <returns></returns> protected virtual bool TryWriteWebConfig() { try { _fileProvider.SetLastWriteTimeUtc(_fileProvider.MapPath("~/web.config"), DateTime.UtcNow); return(true); } catch { return(false); } }
/// <summary> /// Try to write web.config file /// </summary> /// <returns></returns> protected virtual bool TryWriteWebConfig() { try { _fileProvider.SetLastWriteTimeUtc(_fileProvider.MapPath(ConstantKey.WebConfigPath), DateTime.UtcNow); return true; } catch { return false; } }