Moving UseRewrite(bool) to SiteSettings.cs


In /web/RewriteService.cs, line 43, there is a TODO: comment to move USE_REWRITE to SiteSettings.
I tried to do this, move the rewrite settings to SiteSettings but it did not work due to security exception error.
I added a new property called IsUseUrlRewrite in /Core/SiteSettings.cs.
And then, I used "SiteSettingCache.GetSiteSettings()" in /web/rewriteService.cs, line 145, BuildGenericRewriteUrl function, to get the SiteSettings.IsUseUrlRewrite. An error of "System.Security.Securityexception: Request Failed" appears in here. To resolve the issue, I found this recommendation online, http://support.microsoft.com/kb/555466. There are a lot of steps to get around the error and I don't believe this is the best one due to security risks involved in fixing it.
The security exception error message is:
System.Security.Securityexception: Request Failed
Unless there is a better solution to the problem, I think we should move IsUseUrlRewrite in web.config to make it simple.

file attachments


katipunan wrote Aug 23, 2011 at 4:43 PM

I moved the useurlrewrite in web.config

wrote Feb 14, 2013 at 12:29 AM

wrote May 16, 2013 at 5:12 AM

wrote May 16, 2013 at 5:12 AM

wrote Jun 14, 2013 at 7:49 AM