• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

web.config parsing errors

M

MainSoft

Guest
Hi,

My web hosting service (ikoula) is using Plesk 8.1 and I have noticed a bug in Plesk when configuring my ASP .Net application.

This bug (which costed me hours of debugging until I understood what was going on) is related to setting the trust level from the Plesk page. When you change this setting, Plesk opens the web.config file and looks for the <system.web> tag under which it will insert a <trust level="xxxx" /> tag. However, the parser doesn't seem to be aware that <system.web> tags can soemtimes be found not only under the <configuration> root tag but also at other locations in the web.config file. For example, the web.config file for "ASP .Net Forums 2.0" (an old ASP .Net 1.1 app) has multiple sections like this:

<configuration>
...
<location path="EditPost.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="PrivateMessage.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>



In that case, Plesk inserts the <trust level="xxxx" /> at the wrong place (under one of the <location> tags) and re-read it from there.

So when you look at the Plesk page for ASP .Net settings, you think that you are have set the trust level to xxx but it is actually not the case.

So the parser should check at which level in web.config it found the <system.web> tag that it will modify because this tag is not necessarily unique.

Best regards.
 
Very old thread indeed but I discovered today that this error still persist in Obsidian RC4 which is a bit disturbing.

Workaround: add these lines at the top of web.config:

<location path="NonExistent.aspx" allowOverride="false">
<system.web>
<authorization>
<deny users="?" />
</authorization>
<trust level="Full" />
</system.web>
</location>

The Plesk can write whatever trust level it wants there instead, which of course will be ignored.
 
Back
Top