Please consider making XmlPackage paths configurable via web.config or appconfig.
Please consider making XmlPackage paths configurable via web.config or appconfig.
Chris Coddington
Aydus Consulting
Office: 800-419-0391 x303
Direct: 213-785-8201
Mobile: 818-675-1066
Skype: Chris.Coddington
chris@aydus.com
www.aydus.com
We're often requested to make changes that break considerably from functionality that a particular page may provide. While we try very hard to not change source, we also try very hard not to change the files found in the solution's web folder. The way we accomplish this is through the route table that you've provided in the web-config. As an example, if I need to change search to use another provider, I will typically create a path like this in the web folder:
/local/aydus/nextopia/default.aspx
In order to make this page respond to /search.aspx, I will add a like like this to the web.config's route table section:
<add name="Search" url="search.aspx" virtualPath="~/local/aydus/nextopia/default.aspx" checkPhysicalUrlAccess="false" />
This setup works great for pages that do not exist, however, in this particular case the page (search.aspx) exists and the route will not work. In order to make this route as intended, I modify:
/app_code/RegisterRoutes.cs
to have the following code on line 30:
RouteTable.Routes.RouteExistingFiles = true;
While one line may not make a huge difference it is cumulative. When having to upgrade a store, one line in many places can be the difference between a 5 minute upgrade and a 1 week upgrade.
Chris Coddington
Aydus Consulting
Office: 800-419-0391 x303
Direct: 213-785-8201
Mobile: 818-675-1066
Skype: Chris.Coddington
chris@aydus.com
www.aydus.com