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

try530 2009-10-10 12:05:42
未能映射路径“/”。
说明: 执行当前 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


...全文
1162 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
whynotforfun 2012-05-26
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 的回复:]

解决了,是应用池的问题
[/Quote]


能详细说下不??我也遇到了这个问题~!!!!!
才才 2012-05-23
  • 打赏
  • 举报
回复
解决了,是应用池的问题
officing 2012-03-12
  • 打赏
  • 举报
回复
我的是在vs里面调试的也出现这样的问题 应该不会是权限问题吧 www.seodoweb.com
zhuoyue 2011-02-24
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 try530 的回复:]

已解决,并非Server.MapPath的问题,是权限问题。
问题原因:我使用的是win7系统,在打开项目的时候,并非使用的是管理员身份。
解决方式:用管理员身份进入vs2008,为程序目录设置erveryone 的所有权限。---调试正常。
[/Quote]

我也遇到同样的问题,求详细解决方法 啊,怎么为程序目录设置权限啊
y_yangjing 2010-05-18
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 try530 的回复:]
已解决,并非Server.MapPath的问题,是权限问题。
问题原因:我使用的是win7系统,在打开项目的时候,并非使用的是管理员身份。
解决方式:用管理员身份进入vs2008,为程序目录设置erveryone 的所有权限。---调试正常。
[/Quote]

有同样问题,能否详细解释一下
try530 2009-10-10
  • 打赏
  • 举报
回复
谢谢楼上2位的关注,每人给5分。
try530 2009-10-10
  • 打赏
  • 举报
回复
已解决,并非Server.MapPath的问题,是权限问题。
问题原因:我使用的是win7系统,在打开项目的时候,并非使用的是管理员身份。
解决方式:用管理员身份进入vs2008,为程序目录设置erveryone 的所有权限。---调试正常。

chen_ya_ping 2009-10-10
  • 打赏
  • 举报
回复
你可以这样把你的路径显示在网页上,看看是不是准确。
yanzhiyong 2009-10-10
  • 打赏
  • 举报
回复
相对路径和绝对路径的问题吧。。试下Server.MapPath

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧