首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

vs2008 未能映射路径“/”,同样的程序,在同事那边就正常,小弟我这里就不正常,啥有关问题

2012-04-13 
vs2008 未能映射路径“/”,同样的程序,在同事那边就正常,我这里就不正常,啥问题?未能映射路径“/”。说明: 执行

vs2008 未能映射路径“/”,同样的程序,在同事那边就正常,我这里就不正常,啥问题?
未能映射路径“/”。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

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

源错误: 


行 43: /// 流程催办线程
行 44: /// </summary>
行 45: private Weith.ReminderThread.Reminder r = new Weith.ReminderThread.Reminder();
行 46: 
行 47:  
 

源文件: e:\Work\ynsph.SB\Source\www\App_Code\ApplicationGlobal.cs 行: 45 

堆栈跟踪: 


[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
  DataMange.ConString.GetConStringFromAppSettings(String key, String configfilepath) in F:\WEITH\Weith\ynsph.SB\Weith.DataMange\ConString.cs:101
  DataMange.OADataAccess..ctor() in F:\WEITH\Weith\ynsph.SB\Weith.DataMange\OADataAccess.cs:9
  Weith.Templates.SQLMange.Base.SQLProvider..ctor() in F:\WEITH\Weith\ynsph.SB\Weith.Templates\SQLMange\Base\SQLProvider.cs:30
  Weith.ReminderThread.Reminder..ctor() in F:\WEITH\Weith\ynsph.SB\Weith.ReminderThread\Reminder.cs:42
  Global..ctor() in e:\Work\ynsph.SB\Source\www\App_Code\ApplicationGlobal.cs:45
  ASP.global_asax..ctor() in c:\Users\tianling\AppData\Local\Temp\Temporary ASP.NET Files\www\7ee14cd2\6f4aea90\App_global.asax.hep84h1r.0.cs:0

[TargetInvocationException: 调用的目标发生了异常。]
  System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
  System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
  System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230


  System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
  System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1051
  System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
  System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +215
  System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext context) +8885464
  System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext context) +136
  System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +92
  System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289

 


[解决办法]
相对路径和绝对路径的问题吧。。试下Server.MapPath
[解决办法]
你可以这样把你的路径显示在网页上,看看是不是准确。

热点排行