Is Front Page not working

Dec 3, 2010 at 3:24 PM

BE_2.0 RC, SQE_CE,  Is Front Page option not working.  Under options I checked Is Front Page, saved the page, go to front page, refresh and the page chosen as Is Front Page is not displayed.

Thank you.

Coordinator
Dec 3, 2010 at 8:00 PM

This is a compatibility issue with BE and ASP.NET 4.0.  I just checked in a change so Is Front Page will work with ASP.NET 4.0 -- BE 2.0.0.12.  The final BE 2.0 will have this change.  The change is in the BE core, so it might not be easy for you to make this change on your end.  As a temporary workaround, you could do what this person is doing in this post.

Dec 3, 2010 at 8:23 PM
Edited Dec 3, 2010 at 8:24 PM

Thank you Ben, where exactly do I paste this code, and after it is fixed in an upgrade do I have to remove it or can I leave it.

if (BlogEngine.Core.Page.GetFrontPage() != null && Request.RawUrl.ToUpperInvariant().Equals(Utils.RelativeWebRoot.ToUpperInvariant()))
     Response.Redirect("~/default.aspx");

 

 

Coordinator
Dec 3, 2010 at 8:38 PM

That should go in the Page_Load event of default.aspx.cs.  Probably at the top right after:

if (Page.IsCallback)
	return;
After the final BE 2.0 is released, you could keep it, but I would delete it since it shouldn't be needed any longer ... and is probably better not to have to avoid an unnecessary redirect by the browser.  If you end up overwriting your files with the final BE 2.0 files, your change will be erased anyways since the final BE 2.0 files won't have that code in it.

Dec 3, 2010 at 9:01 PM

Thank you, this works great.