When previewing an item in a Sitecore 7.0 solution via Commandy in Sitecore Rocks 1.4.0.0, the command launches a browser and navigates to /sitecore/shell/WebService/browse.aspx as expected, but I am presented with the following error:
Compiler Error Message: CS0117: 'Sitecore.Web.Authentication.TicketManager' does not contain a definition for 'IsCurrentTicketValid'
Specifically, it's complaining about line 8 in browse.aspx, which is part of Sitecore Rocks.
How can I get this functionality working properly? I can preview properly from within the Sitecore Content Manager or Desktop, but the point of Sitecore Rocks is to keep me from having to switch back and forth between Visual Studio and Content Manager/Desktop.
The conditions in line 8 and 9 of browse.aspx make calls that don't exist in Sitecore.Kernel.dll in Sitecore 7.0; it contains code inline in the .aspx file, so you can directly edit it like to so to get it working:
if (Sitecore.Context.User.Identity.IsAuthenticated &&
Sitecore.Web.Authentication.TicketManager.IsCurrentTicketValid() &&
!Sitecore.Security.Authentication.AuthenticationHelper.IsAuthenticationTicketExpired())
{
Sitecore.Web.WebUtil.Redirect(redirect);
return;
}
becomes
if (Sitecore.Context.User.Identity.IsAuthenticated)
{
Sitecore.Web.WebUtil.Redirect(redirect);
return;
}
... and then you're up and running again.