IIS 8 and Plesk web.config to include parent paths and error reporting

I am moving the classic ASP site from an IIS 6 shared hosting site to a shared IIS 8 host that uses Plesk, so IIS is only controlled with a few settings in Plesk or web.config.

Plesk has settings to enable ASP support (which I did) and ASP.NET support (tried and tested, turned on and off, but this is a classic ASP, so it doesn't matter).

I was unable to get enableParentPaths to work. I also cannot get detailed errors. My source web.config probably has material specific to ASP.NET only, but I have made all kinds of suggestions from the forums. I would like to simplify. I just want a classic ASP with ParentPaths and a (temporarily) detailed error report.

UPDATE GoDaddy Tech Support offered a simpler web.config that allowed me to see detailed errors. They don’t know how to enable parent paths, but this is not always a good idea, and it was easy enough to manually change /../../filename to the full path, so the transition to IIS 8 with Plesk is complete.

Here is 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> 

This was a version that did not work:

 <?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> 
+5
source share
1 answer

I was unable to include the parent paths simply using web.config, but I found instructions on how to enable the parent paths in the Plesk control panel:

In the new Plesk panel:

- go to VIrtual Directories

- click Directory Properties

- check the box "Enable parent paths", then save.

+2
source

Source: https://habr.com/ru/post/1203044/


All Articles