如何使用 asp 指令在 IIS Express Config 中设置允许父路径

发布于 2024-12-20 22:33:59 字数 972 浏览 4 评论 0原文

这是以下链接中已回答问题的延续: 如何在 IIS Express Config 中设置允许父路径

我正在 IISexpress 中运行一个经典的 asp 网站。 相同的网站也在 w7 pro 的 IIS 7.5 中使用,并且在 Web 的 IIS 配置中启用父路径工作正常,但尝试在 IISExpress 中使用 web.config 不起作用

我遇到的问题是建议的 web.config 以启用父路径:

    <configuration>
     <system.webServer>
      <asp 
         enableParentPaths="true" 
         bufferingOn="true" 
         errorsToNTLog="true" 
         appAllowDebugging="true" 
         appAllowClientDebug="true" 
         scriptErrorSentToBrowser="true">

         <session allowSessionState="true" />
         <cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
         <limits />
      </asp>
     </system.webServer>
    </configuration>

每次尝试使用任何 asp 标记时都会收到 500 错误 如果我删除 asp 标签,一切正常, 有人有线索吗? TIA

This is a continuation of a answered question in the following link:
How to set Allow Parent Paths in IIS Express Config

I am running a classic asp web site in IISexpress.
The same web site is also used in IIS 7.5 in a w7 pro and works fine enabling the parent paths in the IIS configuration of the web but trying to use the web.config in IISExpress does not work

The problem that I am experiencing is that in the suggested web.config in order to enable the parent paths:

    <configuration>
     <system.webServer>
      <asp 
         enableParentPaths="true" 
         bufferingOn="true" 
         errorsToNTLog="true" 
         appAllowDebugging="true" 
         appAllowClientDebug="true" 
         scriptErrorSentToBrowser="true">

         <session allowSessionState="true" />
         <cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
         <limits />
      </asp>
     </system.webServer>
    </configuration>

I get a 500 error every time that I try to use any asp tag
If I remove the asp tag it all works fine,
Anybody has a clue?
TIA

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

阪姬 2024-12-27 22:33:59

你没有仔细阅读。提到的配置文件不是 web.config。它是applicationHost.config。作为截图:

Win+R

类型

记事本“%userprofile%\Documents\IISExpress\config\applicationhost.config”

点击

这将使用记事本打开主机配置文件。您需要找到您网站的部分。它类似于 ...。查看该节点内部,找到 部分并进行更改。最后,不要忘记从 web.config 中删除 asp 部分。

You have not read carefully. The configuration file that mentioned isn't web.config. It is applicationHost.config. As a shotcut:

Press Win+R

type

notepad "%userprofile%\Documents\IISExpress\config\applicationhost.config"

hit .

This will open the host configuration file with notepad. You need to find your web site's section. It's something like <location path="YourSiteName"> ... </location>. Look inside that node, find the <asp> section and change with yours. Finally, don't forget to remove the asp section from web.config.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文