Fredrik Svensson
New Pleskian
TITLE:
web.config parsing errors
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:Plesk Obsidian RC4,Windows Server 2019, ASP.NET 4.0, x64
PROBLEM DESCRIPTION:This subject was up ages ago and for beeing a bit lazy, I refer to that post from 2007 which is located at web.config parsing errors
I discovered today that this error is till present in Obsidian latest RC.
It's about Plesk writing <trust level="xxxx" /> in the first occurence where it finds the <system.web> tag. The problem is that there might be multiple occurences of <system.web> and the first one is not always the correct one to put trust level in.
What you get then is an error in the form of:
<< Exception message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. >>
STEPS TO REPRODUCE:I discovered today that this error is till present in Obsidian latest RC.
It's about Plesk writing <trust level="xxxx" /> in the first occurence where it finds the <system.web> tag. The problem is that there might be multiple occurences of <system.web> and the first one is not always the correct one to put trust level in.
What you get then is an error in the form of:
<< Exception message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. >>
Insert manually the following somewhere at the top in web.config:
<location path="NonExistent.aspx" allowOverride="false">
<system.web>
<authorization>
<deny users="?" />
</authorization>
<trust level="Full" />
</system.web>
</location>
Then change CAS Trust Level from Plesk and you will see that <Trust level=xxx> is written in the section I pasted above without looking for further <system.web> tags later in web.config.
ACTUAL RESULT:<location path="NonExistent.aspx" allowOverride="false">
<system.web>
<authorization>
<deny users="?" />
</authorization>
<trust level="Full" />
</system.web>
</location>
Then change CAS Trust Level from Plesk and you will see that <Trust level=xxx> is written in the section I pasted above without looking for further <system.web> tags later in web.config.
<< Exception message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. >>
You have to manually edit web.config and remove the line with <trust level=xxx> every time you change something in ASP.NET settings within Plesk.
EXPECTED RESULT:You have to manually edit web.config and remove the line with <trust level=xxx> every time you change something in ASP.NET settings within Plesk.
Well, expected result is that Plesk parse the whole web.config file and inserts trust level in the correct section.
ANY ADDITIONAL INFORMATION:
I hope you can provide a solution for the sharp release of Obsidian on Sept 25th.
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:Confirm bug