我是從共享託管IIS 6站點移動一個經典的ASP站點到使用的Plesk共享IIS 8的主機,所以IIS的唯一控制是通過幾Plesk中的設置或web.config。IIS 8的Plesk web.config中啓用父路徑和錯誤報告
的Plesk具有設置來啓用ASP支持(我做了)和ASP.NET支持(嘗試啓用和禁用,但是這是傳統的ASP所以不應該的問題)。
我一直無法得到enableParentPaths工作。我也無法獲得顯示的詳細錯誤。我的初始web.config可能只與ASP.NET有關,但我一直在嘗試各種來自論壇的建議。我很想簡化。我只想通過ParentPaths和(暫時)詳細的錯誤報告來實現經典的ASP。
UPDATE。 GoDaddy技術支持提出了一個更簡單的web.config,讓我看到詳細的錯誤。他們不知道如何啓用父路徑,但這些並不總是一個好主意,並且很容易手動將/../../filename改爲完整路徑,因此使用Plesk遷移到IIS 8是完整的。
這裏,讓我在調試過程中查看詳細的錯誤,在web.config:
<?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>