Web.configのrequireSSL属性値を「true」に設定すると、スクリーンショットの先読み生成が正しく動作せず、さまざまな問題を引き起こす恐れがあります。
<authentication mode="Forms"> <forms loginUrl="member_login.aspx" cookieless="UseCookies" requireSSL="true" path="/MyApplication" /> </authentication>
例えば、パッケージ生成が失敗し、以下のエラーが出力されます:
Message: The application is configured to issue secure cookies. These cookies require the browser to issue the request over SSL (https protocol). However, the current request is not over SSL. Source: System.Web at System.Web.Security.FormsAuthentication.SetAuthCookie(String userName, Boolean createPersistentCookie, String strCookiePath) at Sitecore.Security.Authentication.FormsAuthenticationProvider.Login(User user) at Sitecore.ContentTesting.Events.GenerateScreenshot.PopulateCookiesForNewSession(List`1 cookies) at Sitecore.ContentTesting.Events.GenerateScreenshot.StartRun(Item item, ItemChanges changes) at Sitecore.ContentTesting.Events.GenerateScreenshot.OnItemSaved(Object sender, EventArgs args) at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result) at Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters) at Sitecore.Events.Event.RaiseItemSaved(Object sender, ItemSavedEventArgs args) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at Sitecore.Data.Engines.EngineCommand`2.RaiseEvent[TArgs](EventHandler`1 handlers, Func`2 argsCreator) at Sitecore.Data.Engines.EngineCommand`2.Execute() at Sitecore.Data.Engines.DataEngine.SaveItem(Item item) at Sitecore.Data.Managers.ItemProvider.SaveItem(Item item) at Sitecore.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain,Func`1pipelineArgsCreator, Func`1 fallbackResult) at Sitecore.Data.Managers.PipelineBasedItemProvider.SaveItem(Item item) at Sitecore.Data.Items.ItemEditing.AcceptChanges(Boolean updateStatistics, Boolean silent) at Sitecore.Install.Items.ItemInstaller.VersionInstaller.InstallVersion(Item version) at Sitecore.Install.Items.ItemInstaller.VersionInstaller.PasteVersion(XmlNode versionXml, Item target, VersionInstallMode mode, IProcessingContext context, Boolean removeOtherVersions) at Sitecore.Install.Items.ItemInstaller.InstallEntry(PackageEntry entry)
この問題を解決するには、スクリーンショットの先読み生成を無効にします。
Sitecore XPバージョン8.0初期リリース~バージョン8.1 Update-2の場合:
\App_Config\Include\Content Testing\Sitecore.ContentTesting.configファイルを開き、次の行にコメントを追加します:
<event name="item:saved"> <handler type="Sitecore.ContentTesting.Events.GenerateScreenshot, Sitecore.ContentTesting" method="OnItemSaved"> <excludeFields hint="list:ExcludeFieldFromComparison"> <created>__created</created> <createdby>__created by</createdby> <updated>__updated</updated> <updatedby>__updated by</updatedby> <revision>__revision</revision> <sortorder>__sortorder</sortorder> <validfrom>__valid from</validfrom> <workflow>__workflow</workflow> <workflowstate>__workflow state</workflowstate> <lock>__lock</lock> <pageleveltestsetdefinition>__Page Level Test Set Definition</pageleveltestsetdefinition> </excludeFields> </handler> </event>
<event name="item:saved:remote"> <handler type="Sitecore.ContentTesting.Events.GenerateScreenshot, Sitecore.ContentTesting" method="OnRemoteItemSaved"> <excludeFields hint="list:ExcludeFieldFromComparison"> <created>__created</created> <createdby>__created by</createdby> <updated>__updated</updated> <updatedby>__updated by</updatedby> <revision>__revision</revision> <sortorder>__sortorder</sortorder> <validfrom>__valid from</validfrom> <workflow>__workflow</workflow> <workflowstate>__workflow state</workflowstate> <lock>__lock</lock> <pageleveltestsetdefinition>__Page Level Test Set Definition</pageleveltestsetdefinition> </excludeFields> </handler> </event>
Sitecore XPバージョン8.1 Update-3以降の場合:
\App_Config\Include\Content Testing\Sitecore.ContentTesting.PreemptiveScreenshot.configファイルを無効にします。