Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Friendly error message

Vote:
 

Hi all!

Didnt know if I should started this new thread or continue in my thread "In admin mode - access to config file is denied", but well ...

My question is about friendly error messages. I read a guide that said that if you, in admin mode, tinker with "Felhantering i EpiServer CMS" / "Error handling in EpiServer CMS" you can get a more friendly error message, that is good. You can also enable the visitor to fill in a form and specify where the mail should be sent. You can schoose if everyone should see it or just visitors not logged in. If you schoose that everyone should see the friendly message, you can specify a group that should see the more technical one. Iam right so far?

Now, what does these settings effect in the episerver.config / episerver.config/web.config?


In EpiServer 6 I have come to this conclusion

EpiServer.config
- <siteSettings globalErrorHandling="on/off/RemoteOnly" ... >
- <siteSettings globalErrorMail="The mail adress to send form to" ... >
web.config
- <customErrors mode="On/off/More?" />

In EpiServer 5 I come to the same conclusion, but all three tags are in web.config, and 'globalErrorMail' is replaced by 'errorMailHandler'


# The two settings in admin mode, I guess they effect the attributes in the siteSettings tag, correct?

# What is <CustomErrors mode="">? What values can it have? What does it do?

# Can you specify your very own error message? Or is it just a defualt one?

# This might be a very stupid question, but if the site is stopped via the IIS, will the friendly error message appear?

# Also, say that I activate the friendly error message to be seen by everyone except the administrator group, and the site crashes, will the site reconize me as an administrator and display the more technical message (not that I understand it but still ...)?

 

As Always, Iam very grateful for the responses. Thanks.

#55504
Dec 06, 2011 8:33
Vote:
 

# The two settings in admin mode, I guess they effect the attributes in the siteSettings tag, correct?

There are 3 options in admin mode for error handling in EPiServer (similar as for ordinary Asp.Net application).

RemoteOnly | On | Off.

These settings later are used by EPiServer.Global class to make decision either to handle exception or not.



# What is <CustomErrors mode="">? What values can it have? What does it do?

Is standard settings that comes with Asp.Net. Not used if EPiServer error handling is enabled.



# Can you specify your very own error message? Or is it just a defualt one?

You can specify it via EPiServer localization (directory lang/). For instance you can specify 500 error title:

<httperrors>

    <status code='500'>

        <title>This is my 500 error title</title>



# This might be a very stupid question, but if the site is stopped via the IIS, will the friendly error message appear?

You most probably will get error message configured in your browser. If there will be no response from IIS, browser is taking care of messge rendering to the end client.

 

# Also, say that I activate the friendly error message to be seen by everyone except the administrator group, and the site crashes, will the site reconize me as an administrator and display the more technical message (not that I understand it but still ...)?

If you will be logged in into the site as adminstrator and EPiServer will have access to PrincipalInfo (class used to access user info) and that user will have permissions for seeing detailed error message (actually stack trace is only included) then administrator will see detailed error message.

 

However this all could be handled by your own Http module or custom code.

Hope this helps!

#55544
Dec 07, 2011 9:00
Vote:
 

Valdis: Yes it helps alot. Thank you very much for taking your time writing the response. I will digest this, so to speak, in my own pace. I'am a bit of a newbie. Have a nice day!!

#55546
Dec 07, 2011 10:48
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.