November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Have a look at the globalErrorHandling property in your applicationSettings
Set whether to use EPiServer CMS error handling with the following possible values: On, Off or RemoteOnly.
|
This can also be controlled via the Admin interface
If this is set to Error handling off it will use what you have set in the web.config i.e we have
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" />
<error statusCode="404" path="/NotFound" responseMode="ExecuteURL" />
<remove statusCode="500" subStatusCode="-1" />
<error statusCode="500" path="/500.aspx" responseMode="ExecuteURL" />
</httpErrors>
I have changed this setting to OFF in the environment where we have friendly error messages but nothing has changed, I am still getting the nice view.
At the same time I have only this on locahost
And I do not know where to copy the settings from other environments, i.e., those where friendly messages are enabled, from. These settings do not exist in these files
Try
<httpErrors errorMode="DetailedLocalOnly" existingResponse="Auto" />
... or
<httpErrors errorMode="Detailed" existingResponse="Auto" />
Also
<system.web>
<customErrors mode="Off" />
</system.web>
@Eric, tried your suggestion, no change, still getting Stack Trace.
Changing the setting in Admin to
returns this
instead of
and yet still it is not this, which is what I am looking for...
Sorry, I missunderstood your post 😣
Here's what we do to hide error messages in dev
<system.webServer>
<httpErrors errorMode="Custom" existingResponse="Auto">
<remove statusCode="400" subStatusCode="-1"/>
<remove statusCode="401" subStatusCode="-1"/>
<remove statusCode="403" subStatusCode="-1"/>
<remove statusCode="404" subStatusCode="-1"/>
<remove statusCode="410" subStatusCode="-1"/>
<remove statusCode="500" subStatusCode="-1"/>
<error path="/Error/BadRequest" responseMode="ExecuteURL" statusCode="400"/>
<error path="/Error/Unauthorized" responseMode="ExecuteURL" statusCode="401"/>
<error path="/Error/Forbidden" responseMode="ExecuteURL" statusCode="403"/>
<error path="/Error/NotFound" responseMode="ExecuteURL" statusCode="404"/>
<error path="/Error/Gone" responseMode="ExecuteURL" statusCode="410"/>
<error path="/Error/InternalError" responseMode="ExecuteURL" statusCode="500"/>
</httpErrors>
...
</system.webServer>
Each path must exist as routable url, we have them as specific pages in the CMS
But if we do not have this and yet somehow this works on two environments, where else could this be setup... (headache)
Possibly related to environment specific config transforms, or even something as simple as you building with debug in dev and release to the other environments
Finally we found it - it was in BaseAnyContentController method OnException we had an if clause "if (!Request.IsLocal)"
The exact configuration for displaying custom error messages instead of the full stack trace on localhost depends on the web server platform you are using. Generally, it involves adding custom error pages and setting the appropriate HTTP status codes to indicate an error condition. For example, if you are using Apache, you can use the ErrorDocument directive in your .htaccess file to configure custom error pages. In some cases, you may need to make changes to the web.config file to properly configure custom error pages. The exact configuration settings will depend on your particular web server platform. Additionally, you may need to configure any errors that are not supported by the web server, such as 404 Not Found errors, manually.
(Yes, it is embarrassing but it is as it is : D )
We do not seem to know / remember how to enable friendly error messages on a localhost (or how they are configured overall).
Friendly error message:
On localhost we get the full stack message.
I have googled the issue and tried to change the web.config accoring to this link but then it expects me to provide the actual file that should be displayed instead of the error message.
Also in integration web.config where we get friendly messages this setting does not exist.
So where is it configured then? Where and how is it enabled and how is it determined which file(s) to show instead of the full error message?