zoukankan      html  css  js  c++  java
  • 关于vs 2005的一个问题, 解决The path "xxxx' maps to a directory outside this application, which is not supported.

    具体表现为, vs2005下新建一个基于http方式的website, 访问任何页面都出现黄页错误信息, 具体的错误信息

    Server Error in '/Study2006/WetStudyHttp' Application.
    --------------------------------------------------------------------------------

    The path '/Study2006/WetStudyHttp/App_GlobalResources/' maps to a directory outside this application, which is not supported. 

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.Web.HttpException: The path '/Study2006/WetStudyHttp/App_GlobalResources/' maps to a directory outside this application, which is not supported.


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 

    这个问题困扰多日, 一直没有找到合适的办法解决.
    但是新建一个基于file system的website就不会出现这样的错误, 虽然这样也可以, 但是总感觉不爽啊.

    把vs2005卸载了重装了N次, 这个问题依旧.

    今天不甘心, 又上网搜了一下这方面的东西, 可惜还是没有一个正确的方法来解决问题.

    后来偶然的切换到asp.net2.0的配置标签上, 突然发现了异常之处, 看下面的图.

    vs2005error.gif

    我把这个web.config的路径copy到资源管理器里面, 果然提示找不到该文件, 看来就是这个地方出现的问题了.

    马上打开iis的根目录一看, 我的根目录是指向如下的地址:

    iisroot.gif

    就是这个iis根目录后面的这个反斜线出的问题, 我新建的website会去找相应的配置文件的时候
    都会在iis根目录的后面自动又加上了一个反斜线, 所以造成的路径 E:\Project\\xxx 无效.

    我把iis的根目录由 E:\Project\ 去掉后面的反斜线, 改为 E:\Proect 一切正常了.

    但是显示出来的错误信息并没有把这个路径完全的show出来, 这样就给我们一个莫名其妙的错误信息.
    如果能显示一个完整的路径, 我想, 这个问题就不会困扰我这么久了.
  • 相关阅读:
    关于Thread ThreadPool Parallel 的一些小测试demo
    VS附加到进程调试
    netcore 实现一个简单的Grpc 服务端和客户端
    CodeSmith 找不到请求的 .Net Framework Data Provider
    ocelot集成consul服务发现
    使用ocelot作为api网关
    关于add migration 报错的问题解决方案
    关于多线程efcore dbcontext 的解决方案。
    docker mysql 容器报too many connections 引发的liunx磁盘扩容操作
    关于liunx 机器脱机环境(netcore)Nuget包迁移的问题
  • 原文地址:https://www.cnblogs.com/index/p/340957.html
Copyright © 2011-2022 走看看