本文介绍了IIS 8和Plesk web.config启用父路径和错误报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将经典的ASP网站从共享的IIS 6主机站点迁移到使用Plesk的IIS 8共享主机,因此对IIS的唯一控制是通过Plesk或web.config中的一些设置.

I'm moving a classic ASP site from shared hosting IIS 6 site to shared IIS 8 host that uses Plesk, so the only control of IIS is via a few settings in Plesk, or web.config.

Plesk具有启用ASP支持(已完成)和ASP.NET支持(尝试启用和禁用的设置,但这是经典的ASP,因此无关紧要).

Plesk has settings to enable ASP support (which I have done) and ASP.NET support (tried enabled and disabled, but this is classic ASP so should not matter).

我无法使enableParentPaths正常工作.我也无法获得显示的详细错误.我最初的web.config可能只具有与ASP.NET相关的内容,但是我一直在尝试来自论坛的各种建议.我想简化一下.我只想要经典的ASP与ParentPaths和(临时)详细的错误报告.

I have been unable to get enableParentPaths to work. I also cannot get detailed errors displayed. My initial web.config probably has stuff only relevant to ASP.NET, but I have been trying all sorts of suggestions from forums. I would love to simplify. I just want classic ASP with ParentPaths and (temporarily) detailed error reporting.

更新. GoDaddy技术支持建议使用一个更简单的web.config,它使我能够看到详细的错误.他们不知道如何启用父路径",但这并不总是一个好主意,因为很容易手动将/../../filename更改为完整路径,所以使用Plesk迁移到IIS 8的操作就完成了.

UPDATE. GoDaddy Tech Support suggested a simpler web.config that allowed me to see detailed errors. They do not know how to enable Parent Paths, but those are not always a good idea and it was easy enough to manually change /../../filename to a full path, so the migration to IIS 8 with Plesk is complete.

这是web.config,可让我在调试过程中查看详细的错误:

Here is the web.config that allows me to see detailed errors during debugging:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
    <system.web>
        <customErrors mode="Off" />
        <compilation debug="true" />
    </system.web>
</configuration> 

这是行不通的版本:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path="mydomain.com" overrideMode="Allow">  
  <system.webServer>
    <httpErrors errorMode="Detailed" existingResponse="PassThrough" />      
    <asp enableParentPaths="true" appAllowDebugging="true" scriptErrorSentToBrowser="true">
        <session keepSessionIdSecure="false" />
    </asp>
  </system.webServer>
  <system.web>
    <customErrors mode="Off" />
    <compilation debug="true" />
    <authentication mode="None" />
    <trust level="Full" />
  </system.web>
</location>
</configuration> 

推荐答案

我无法仅通过使用web.config来启用父路径,但是我确实在Plesk控制面板中找到了有关如何启用父路径的说明:

I was not able to enable parent paths simply by using the web.config, but I did find instructions on how to enable parent paths in the Plesk control panel:

在新的Plesk面板中:

In the new Plesk panel:

-转到虚拟目录

-单击目录属性

-选中启用父级路径"框,然后保存.

-- check the box "Enable Parent Paths", then save.

这篇关于IIS 8和Plesk web.config启用父路径和错误报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 12:50