April 28, 2011

Infinite loop when using sitecore and the iis url rewriting

Recently I have install the ULRewrite module for IIS7 : http://www.iis.net/download/URLRewrite

Everything was good but during my tests with IE7 I had a strange comportment: I have an infinite loop on the error page.

In fact, it was a mistake during the configuration of this module. Effectively, this module add this section in the web.config.
<httpErrors>
  <remove statusCode="404" subStatusCode="-1" />
  <error statusCode="404" prefixLanguageFilePath="" path="/notfound" responseMode="ExecuteURL" />
 </httpErrors>
</system.webServer>
But the error page I have configured as the ItemNotFoundUrl is error-page-not-found.aspx:
<setting name="ItemNotFoundUrl" value="/sitecore/service/error-page-not-found.aspx" />
So we only need to put this url of our custom error page in path="XXX” or simply remove the section <httpErrors>

April 11, 2011

Master page and webedit

When you use the masterpages, in Sitecore you may experiment some troubles with the webedit. Effectively, the webedit toolbar doesn't appear. 

 But, this is easily fixable. You only need to add this in you page:
<sc:placeholder key="webedit" runat="server" />