ASP.NET: Fix for WebParts + UrlRewriting Issue(pietschsoft.com)
submitted by
crpietschmann(11.3k) 3 years, 11 months ago
The problem with using WebParts with UrlRewriting (or UrlMapping) is the WebPart PersonalizationProvider uses the path of the page being rendered to save/load the personalization state, not the path that was rewritten that the user sees. So, to fix this you just need to create a custom PersonalizationProvider and override all the methods that reference path, and call the base methods but pass in the path that was requested instead of the path being rendered. Here's a SqlPersonalizationProvider I wrote that does this:
|category: ASP.NET
|Views: 19
tags:
UrlRewriting UrlMapping WebParts ASP.NET another
Everyones tags:
Your Tags: