• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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