代码如下,请教高手,小弟在线等候,请帮帮忙,调试过程提示错误的位置已经设置成红色using System;
using System.Web;
using System.Web.Caching;
using System.Xml;
using System.Xml.XPath;/// <summary>
/// configProcess 的摘要说明
/// </summary>
namespace IOnhui.Config
{
public static class SysConfig
{
private static XmlDocument configDoc = new XmlDocument();
private static XmlElement configRoot;
public static Cache OnhuiCache;
/// <summary>
/// 获取系统路径
/// </summary>
public static string systemPath
{
get
{
return HttpContext.Current.Request.PhysicalApplicationPath;
}
} static SysConfig()
{
if (OnhuiCache["SystemConfig"] == null)
{
configDoc.Load(systemPath + "Core\\Config\\SystemConfig.xml");
CacheDependency cacheDep = new CacheDependency(systemPath + "Core\\Config\\SystemConfig.xml");
OnhuiCache.Add("SystemConfig", configDoc.DocumentElement, cacheDep, DateTime.MaxValue, TimeSpan.Zero, CacheItemPriority.High, null); }
configRoot = (XmlElement)OnhuiCache["SystemConfig"];
}
using System.Web;
using System.Web.Caching;
using System.Xml;
using System.Xml.XPath;/// <summary>
/// configProcess 的摘要说明
/// </summary>
namespace IOnhui.Config
{
public static class SysConfig
{
private static XmlDocument configDoc = new XmlDocument();
private static XmlElement configRoot;
public static Cache OnhuiCache;
/// <summary>
/// 获取系统路径
/// </summary>
public static string systemPath
{
get
{
return HttpContext.Current.Request.PhysicalApplicationPath;
}
} static SysConfig()
{
if (OnhuiCache["SystemConfig"] == null)
{
configDoc.Load(systemPath + "Core\\Config\\SystemConfig.xml");
CacheDependency cacheDep = new CacheDependency(systemPath + "Core\\Config\\SystemConfig.xml");
OnhuiCache.Add("SystemConfig", configDoc.DocumentElement, cacheDep, DateTime.MaxValue, TimeSpan.Zero, CacheItemPriority.High, null); }
configRoot = (XmlElement)OnhuiCache["SystemConfig"];
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货