日期:2014-05-18  浏览次数:21178 次

未能映射路径“/”
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.InvalidOperationException: 未能映射路径“/”。

源错误: 


行 17: private static readonly ISiteSetting site = DataAccess.CreateSiteSetting();
行 18: 
行 19: private static readonly Configuration config = WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath);
行 20: 
行 21: public static SiteSettings GetSiteSettings(string applicationName)
 

源文件: D:\JiaEN\BLL\SiteSetting.cs 行: 19 

堆栈跟踪: 


[InvalidOperationException: 未能映射路径“/”。]
  System.Web.Configuration.ProcessHostConfigUtils.MapPathActual(String siteName, VirtualPath path) +253
  System.Web.Configuration.ProcessHostMapPath.MapPathCaching(String siteID, VirtualPath path) +669
  System.Web.Configuration.ProcessHostMapPath.GetPathConfigFilenameWorker(String siteID, VirtualPath path, String& directory, String& baseName) +19
  System.Web.Configuration.ProcessHostMapPath.System.Web.Configuration.IConfigMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +37
  System.Web.Configuration.HostingPreferredMapPath.GetPathConfigFilename(String siteID, String path, String& directory, String& baseName) +75
  System.Web.Configuration.WebConfigurationHost.GetStreamName(String configPath) +8845430
  System.Configuration.Internal.DelegatingConfigHost.GetStreamName(String configPath) +13
  System.Configuration.BaseConfigurationRecord.InitConfigFromFile() +154

[ConfigurationErrorsException: 加载配置文件时出错: 未能映射路径“/”。]
  System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) +650948
  System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) +31
  System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) +356
  System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) +29
  System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) +775
  System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) +84
  System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(String path) +36
  Jiaen.BLL.SiteSetting..cctor() in D:\JiaEN\BLL\SiteSetting.cs:19

[TypeInitializationException: “Jiaen.BLL.SiteSetting”的类型初始值设定项引发异常。]
  Jiaen.BLL.SiteSetting.GetSiteSettings(String applicationName) in D:\JiaEN\BLL\SiteSetting.cs:24
  Jiaen.Controls.SiteImage..ctor() in D:\JiaEN\Controls\SiteImage.cs:24
  ASP.control_viewdefaultbanner_ascx.__BuildControlSiteImage1() in d:\JiaEN\web\Control\ViewDefaultBanner.ascx:18
  ASP.control_viewdefaultbanner_ascx.__BuildControlTree(control_viewdefaultbanner_ascx __ctrl) in d:\JiaEN\web\Control\ViewDefaultBanner.ascx:1
  ASP.control_viewdefaultbanner_ascx.FrameworkInitialize() in d:\JiaEN\web\Control\ViewDefaultBanner.ascx.cs:912307
  System.Web.UI.UserControl.InitializeAsUserControlInternal() +35
  System.Web.UI.UserControl.InitializeAsUserControl(P