<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><language>en</language><title>Blog posts by Nansen</title> <link>https://world.optimizely.com/blogs/Nansen/</link><description></description><ttl>60</ttl><generator>Optimizely World</generator><item> <title>Scheduled Jobs not running after site upgrade</title>            <link>http://blog.nansen.com/2013/04/scheduled-jobs-not-running-after-site.html</link>            <description>&lt;p&gt;After an upgrade of a customer site from EPiServer 5 to EPiServer 6 all scheduled jobs stopped working in all  environments. When debugging the scheduling service (in a command prompt run &quot;EPiServer.SchedulerSvc.exe DEBUG&quot; in the service directory) we noticed that when the service tried to connect to the site it failed with the following error message,&lt;/p&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;#INF# [_LM_W3SVC_1_ROOT] Failed calling site (Attempting to deserialize an empty stream.)&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We tried to clear the &quot;EPiServer.SchedulerService.Sites.xml&quot; file to force a re-registration of the site but it never registered. After some thinking and contact with EPiServer support we found the fault, a missing module in Web.config. When we added the &quot;FirstBeginRequestModule&quot; module to the modules section everything started working again. &lt;/p&gt;&lt;pre class=&quot;language-xml&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;  &amp;lt;system.webServer&amp;gt;&lt;br /&gt;    &amp;lt;modules runAllManagedModulesForAllRequests=&quot;true&quot;&gt;&lt;br /&gt;      &amp;lt;add name=&quot;FirstBeginRequestModule&quot; precondition=&quot;managedHandler&quot; type=&quot;EPiServer.Web.InitializationModule, EPiServer&quot;&amp;gt;&lt;br /&gt;    &amp;lt;/modules&amp;gt;&lt;br /&gt;  &amp;lt;/system.webServer&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</description>            <guid>http://blog.nansen.com/2013/04/scheduled-jobs-not-running-after-site.html</guid>            <pubDate>Thu, 04 Apr 2013 16:24:00 GMT</pubDate>           <category>Blog post</category></item><item> <title>Set up an EPiServer site in a snap</title>            <link>http://blog.nansen.com/2013/03/set-up-episerver-site-in-snap.html</link>            <description>Do you also work on a digital agency where you have several dozen of customer sites? In that case I bet you have spent some time setting up sites in IIS web server, followed by trying to remember the path to the HOSTS file and finding an appropriate EPiServer license file that you then copy to the site.&lt;br /&gt;&lt;br /&gt;Sure, it does not take that long to do it all but it sure as heck is boring and repetitive. It can easily be avoided by some automation.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;WIA is the new kid on the block&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To automate this process I decided to start a project called &lt;a href=&quot;https://github.com/nansen/wia&quot; style=&quot;font-weight: bold;&quot; target=&quot;_blank&quot;&gt;WIA&lt;/a&gt;, that is an easy to use command line tool. It will do all the steps required to set up an EPiServer CMS site, all before you have had a chance to take another sip of your coffee.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-hE-dPSU7PLQ/UUjWhCuhnyI/AAAAAAAAAGw/RCz7mkv1MqI/s1600/wia-01.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;http://3.bp.blogspot.com/-hE-dPSU7PLQ/UUjWhCuhnyI/AAAAAAAAAGw/RCz7mkv1MqI/s400/wia-01.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Actually, WIA will do all the following steps for you:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;-&lt;/span&gt;&lt;/span&gt; Figure out what kind of project you have (EPiServer and .NET versions etc).&lt;br /&gt;- Create a new site in IIS with appropriate configuration.&lt;br /&gt;- Add a site mapping in EPiServerFramework.config matching your new IIS site.&lt;br /&gt;- Update the HOSTS file with an entry for the web project&#39;s URL.&lt;br /&gt;- Copy a license file for EPiServer CMS to the web directory.&lt;br /&gt;- Build the solution and display any errors that occurred.&lt;br /&gt;- Ping the site so that it starts up.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;Sound good. Now let me try it&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Does this tool sound like something that would improve your workflow? Head over to the git-repo at&amp;nbsp;&lt;a href=&quot;https://github.com/nansen/wia&quot;&gt;https://github.com/nansen/wia&lt;/a&gt;&amp;nbsp;for instructions how to install the tool and its usage.&lt;br /&gt;&lt;br /&gt;If you find problems please feel free to submit issues at the Github page, or even a pull-request if you are feeling kind.&lt;br /&gt;&lt;br /&gt;</description>            <guid>http://blog.nansen.com/2013/03/set-up-episerver-site-in-snap.html</guid>            <pubDate>Wed, 20 Mar 2013 09:00:00 GMT</pubDate>           <category>Blog post</category></item><item> <title>Commerce in Windows 8</title>            <link>http://blog.nansen.com/2012/10/commerce-in-windows-8.html</link>            <description>It looks like Microsoft has decided that a file included with the .NET Framework 3.5 and used by Commerce is not importent so they have skipped it with the .NET 3.5 installation for Windows 8.&lt;br /&gt; The file that is missing is &quot;System.IdentityModel.Selectors.dll&quot;, just copy the file from a Windows 7 installation &quot;C:\Program Files\Reference Assemblies\Microsoft\Framework\&quot; and put it into your Commerce bin directory.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/6619606000431090378-5815886825071750858?l=blog.nansen.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</description>            <guid>http://blog.nansen.com/2012/10/commerce-in-windows-8.html</guid>            <pubDate>Fri, 05 Oct 2012 09:18:00 GMT</pubDate>           <category>Blog post</category></item><item> <title>EPiServer Commerce Associations</title>            <link>http://blog.nansen.se/2012/02/episerver-commerce-associations.html</link>            <description>In the last couple of Commerce projects I have had trouble with associations, when saving them I get an exception. The cause for this error is two missing rows in the commerce database, the table should in a normal installation only contain this two rows and when I have had the problem the table has been empty.&lt;br /&gt;-------------------&lt;br /&gt;INSERT INTO [AssociationType]([AssociationTypeId],[Description]) VALUES(&#39;OPTIONAL&#39;,&#39;Optional&#39;);&lt;br /&gt;INSERT INTO [AssociationType]([AssociationTypeId],[Description]) VALUES(&#39;REQUIRED&#39;,&#39;Required&#39;);&lt;br /&gt;-------------------&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/6619606000431090378-9162565960659812021?l=blog.nansen.se&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</description>            <guid>http://blog.nansen.se/2012/02/episerver-commerce-associations.html</guid>            <pubDate>Tue, 07 Feb 2012 10:37:00 GMT</pubDate>           <category>Blog post</category></item><item> <title>Meta field limit in EPiServer Commerce</title>            <link>http://blog.nansen.se/2011/09/meta-field-limit-in-episerver-commerce.html</link>            <description>In a EPiServer Commerce project i&#39;m working on we have catalog entries with a good amount of custom meta fields. When we did a new release to stage last week and added one more meta field we got the following error back from .NET on one entry,&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Must declare the scalar variable &quot;@ShortDe&quot;.&lt;br /&gt;Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 0.&lt;br /&gt;The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and this error message on another entry,&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Must declare the scalar variable &quot;@&quot;.&lt;br /&gt;Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 0.&lt;br /&gt;The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We had apperantly reched an internal limit in EPiServer Commerce on the number of meta fields you could add to an meta class, or rather the total length of the names of all meta fields added to an meta class. After some reflection of the code and searching in the database we found the stored procedure that was responsible for the error, &quot;mdpsp_sys_CreateMetaClassProcedure&quot;, in there we found a long list of variables declared to be &quot;NVARCHAR(4000)&quot;, this were responsible for truncating our field list. The fix we did was to change this from NVARCHAR(4000) to VARCHAR(MAX) (e.g. VARCHAR(8000)). This will give us some more room to add new meta fields.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;...&lt;br /&gt;DECLARE @OPEN_SYMMETRIC_KEY varchar(MAX)&lt;br /&gt;DECLARE @CLOSE_SYMMETRIC_KEY varchar(MAX)&lt;br /&gt;&lt;br /&gt;SET @OPEN_SYMMETRIC_KEY = &#39;&#39;&lt;br /&gt;SET @CLOSE_SYMMETRIC_KEY = &#39;&#39;&lt;br /&gt;&lt;br /&gt;DECLARE @MetaClassFieldList varchar(MAX)&lt;br /&gt;DECLARE @MetaClassFieldList_E varchar(MAX)&lt;br /&gt;DECLARE @MetaClassFieldListWithAt varchar(MAX)&lt;br /&gt;DECLARE @MetaClassFieldListSet varchar(MAX)&lt;br /&gt;DECLARE @MetaClassFieldListInsert varchar(MAX)&lt;br /&gt;&lt;br /&gt;DECLARE @MetaClassFieldList_L varchar(MAX)&lt;br /&gt;DECLARE @MetaClassFieldListSet_L1 varchar(MAX)&lt;br /&gt;DECLARE @MetaClassFieldListSet_L2 varchar(MAX)&lt;br /&gt;DECLARE @MetaClassFieldList_LI varchar(MAX)&lt;br /&gt;DECLARE @MetaClassFieldListInsert_L1 varchar(MAX)&lt;br /&gt;DECLARE @MetaClassFieldListInsert_L2 varchar(MAX)&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This bug is present in all current versions of EPiServer Commerce up to 1.1 R2 SP1.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/6619606000431090378-7253669460460216042?l=blog.nansen.se&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</description>            <guid>http://blog.nansen.se/2011/09/meta-field-limit-in-episerver-commerce.html</guid>            <pubDate>Tue, 06 Sep 2011 11:06:00 GMT</pubDate>           <category>Blog post</category></item></channel>
</rss>