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

Try our conversational search powered by Generative AI!

[WebForms] Postback is not working when UseTrailingSlash is disabled

Found in

EPiServer.CMS.Core 10.5.0

Fixed in

EPiServer.CMS.Core 10.9.1

(Or a related package)

Created

May 08, 2017

Updated

May 16, 2017

Area

CMS Core

State

Closed, Fixed and tested


Description

Steps to reproduce
1. Use an Alloy site and add the following code in an initialization module:

ServiceLocator.Current.GetInstance<RoutingOptions>().UseTrailingSlash = false;

2. Use a function that posts back data to server.

Expected: Should work.
Actual: You get a 404.

Note: If UseTrailingSlash is not disabled, you still get a URL that ends with an extra dot and slash "/./" in the action attribute on the form HMTL element that should not be there. But, since it translates to the current folder in the URL standard, it does not affect the functionality of postbacks. The problem is, if you disable trailing slash, you get URLs that look like "/page1/page2/./page2". That doesn't work, since they translate to "/page1/page2/page2".