• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.

Resolved Protected directory error: This server variable cannot be modified during request execution.

M_N

Basic Pleskian
Windows Server 2012 R2. Updated to Obsidian from Onyx yesterday.

When loading any page (even plain text) in a plesk protected directory, we get an error: "This server variable cannot be modified during request execution."
(by default this error does not show, I needed to set customErrors mode="off" to see the error).

(I switched the app pool to classic mode instead of integrated mode and it works, but apparently classic mode is not ideal and this solution is only a last resort).

Full error:

Server Error in '/' Application.
This server variable cannot be modified during request execution.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: This server variable cannot be modified during request execution.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): This server variable cannot be modified during request execution.]
System.Web.HttpServerVarsCollection.SetServerVariableManagedOnly(String name, String value) +3418531
System.Web.HttpServerVarsCollection.SynchronizeServerVariable(String name, String value, Boolean ensurePopulated) +52
System.Web.HttpRequest.SynchronizeServerVariable(String name, String value) +120
System.Web.Hosting.IIS7WorkerRequest.GetServerVarChanges(HttpContext ctx) +321
System.Web.Hosting.IIS7WorkerRequest.SynchronizeVariables(HttpContext context) +9918689
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +156

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4261.0
 
Do you have the "Helicon Ape" software installed? If so, removing it will help.
 
Do you have the "Helicon Ape" software installed? If so, removing it will help.
Thank you

Yes I do have Helicon Ape installed.

I use it, removing it is not an option.

Unless there is a way to remove it from the password protected directory while leaving it active on the rest of the site.
 
Note that Helicon Ape is a 3-rd party application which is not shipped nor integrated into Plesk, so the actual reason why it is incompatible is not known at the moment. Should you require it to be installed on the server anyways, I suggest you contact Helicon Support regarding this matter.
 
Note that Helicon Ape is a 3-rd party application which is not shipped nor integrated into Plesk, so the actual reason why it is incompatible is not known at the moment. Should you require it to be installed on the server anyways, I suggest you contact Helicon Support regarding this matter.
Thank you, I understand that, I will reach out to them, but in the meantime do you know if it is possible to remove their handler from just the protected directory?
 
I tried adding this to the directory and the problem remains.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="Helicon.Ape Handler" />
</handlers>
</system.webServer>
</configuration>
 
I discovered that switching to classic mode works because helicon ape doesn't work on classic mode.

Any other suggestions?

This worked until the update, so it's something that changed with the obsidian update.
 
Update

The following web.config resolves the issue.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<modules>
<remove name="Helicon.Ape" />
</modules>
</system.webServer>
</configuration>

Note that this setting can only be set at the root of an application. If you need helicon ape on the main website but not in a password protected subfolder you need to convert that subfolder to an application.
 
Back
Top