Release 7.5
Jul 02, 2014
Aug 29, 2014
Falcon/Commerce
Closed, Fixed and Tested
Redirecting to a custom error page doesn't seem to work with Commerce site. For example, if you point your connectionstring to an invalid db name (settting custom errors "On" for both local and remote), you get a runtime error.
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.
Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="On" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
However, on the CMS site, the redirect works fine and you should see the custom error page when you visit the CMS site.
Steps to reproduce:
- Setup a basic custom error page on webroot of Commerce Manager (customerror.htm or something)
- In IIS or web.config, setup turn on custom errors. Example:
<customErrors defaultRedirect="http://locahost:8004/Custom404.htm" mode="On">
<error redirect="http://localhost:8004/custom404.htm" statusCode="500" />
</customErrors>
- Change connectionstrings.config to point to invalid db. For example, change Initial Catalog to some random name.
- Try to open Commerce site. You get runtime error above (turn off custom errors you get full stack trace as you should).
Do the same with CMS site and redirect works as expected.