Blog posts by Petter Klang2015-02-27T10:38:39.0000000Z/blogs/Petter-Klang/Optimizely WorldSetting up WebDeploy/blogs/Petter-Klang/Dates/2015/2/setting-up-webdeploy/2015-02-27T10:38:39.0000000Z<p>After running in to the same problem over and over I though I would make this post to remind myself and to share with others.</p> <p>WebDeploy is easy as long as you can get the Web Platform Installer and then just follow the steps in this <a href="http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy-on-iis-80-or-later">guide</a>. </p> <p>But should you find yourself (like I do) on a server that doesn’t alow for the installer to go and get it’s goodies then there are some steps to remember in order to keep you from pulling your hair out.</p> <ol> <li> <p>By default the port 8172 is used for Web Deploy so make sure the the firewall is open</p> </li> <li> <p>  Get the <a href="http://www.iis.net/downloads/microsoft/web-deploy">msi</a> file for WebDeply and run it. Remember to click custom and add the Remote Agent Service. <br /><a href="/link/891845dbe6914bf5ab799c8d25e525b3.aspx"><img title="MSWebDeploy" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="MSWebDeploy" src="/link/81e6da212df04d40ae06bbdd27bd0f47.aspx" width="244" height="192" /></a>  </p> </li> <li> <p>Open up the server management and add the Role “Management Service” . <br /><a href="/link/3a05acd752214e50b76c39b7e5908713.aspx"><img title="ManagementService" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="ManagementService" src="/link/f00dea4c7b9e471d94b261deb8df633b.aspx" width="244" height="174" /> </a></p> </li> <li> <p>Go to the IIS and EnableRemoteConnections for the Management Service. <br /><a href="/link/bb223cfd6fee4cb8a2cee64873ff69c3.aspx"><img title="IISManagementService" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="IISManagementService" src="/link/7698ccef0364457dab87c65c5427d41b.aspx" width="244" height="143" /></a> <br /><a href="/link/c6cc80b6cc4d428aa82343ce8ec9a38b.aspx"><img title="EnableRemoteConnections" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="EnableRemoteConnections" src="/link/4037fc10117f4a41ac12c0bea6022460.aspx" width="244" height="103" /></a> </p> </li> <li> <p>Right click the site and get the Deploy configuration for the site and import this in Visual Studio</p> <a href="/link/5f045e9c551a4fa8812ef8e598267a9a.aspx"><img title="Configure_web_deploy" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="Configure_web_deploy" src="/link/17ed7f60fe2e42dbad014b9a6d1b57a2.aspx" width="244" height="204" /></a> </li> </ol> <p>And you are <a href="https://www.youtube.com/watch?v=y0V4TZAyd8I">done!</a></p>Error installing Find on 7.0 site/blogs/Petter-Klang/Dates/2013/10/Error-installing-Find-on-70-site/2013-10-18T10:36:16.0000000Z <p>Yesterday I found myself in the position to install EPiServer Find on a CMS 7 site but following the eminent blog from Ted I ran in to some issues. When getting the Nuget package I also got the updated CMS dll;s as Find has a dependency to it. When starting up the site I was hit with the YSOD telling me the following: </p> <p>Error when creating the EPiServer.Configuration.Settings.All list: The <episerver> configuration section could not be found in the configuration file [ConfigurationErrorsException: Error when creating the EPiServer.Configuration.Settings.All list: The <episerver> configuration section could not be found in the configuration file] <br />   EPiServer.Configuration.EPiServerSection.GetAndValidateSection(Configuration config) <br />..... <br /></p> <p>After some hair pulling and some digging around with Reflector I could see that EPi was loading the old EPiServer.Configuration.dll. And looking a the web.config I could see that not all my assembly redirects had been updated. So doing this manually fixed the problem. </p> <p>  <dependentAssembly> <br />    <assemblyIdentity name="EPiServer.Configuration" publicKeyToken="8fe83dea738b45b7" culture="neutral" /> <br />    <bindingRedirect oldVersion="0.0.0.0-7.0.586.1" newVersion="7.0.586.<font color="#ff0000">24</font>" /> <br />  </dependentAssembly></p> <p> <br />Just wanted to share incase anyone else ever found themselves in the same situation. </p>Finding your Versioned files on disk/blogs/Petter-Klang/Dates/2011/4/Finding-your-Versioned-files-on-disk/2011-04-12T12:53:00.0000000Z<p>When you add a file in EPiServer using the versioning provider you will find that the file is named to a Guid in Windows file system. So finding a particular file could be troublesome.</p>
<p>One way of getting the connection between file name and Guid that I find myself using a lot when troubleshooting is the use of these SPs.</p>
<p>select pkID from tblItem where Name like 'filename'</p>
<p>Then use that (those) pkID in this one:</p>
<p>exec RelationListFrom @FromId=N'pkID',@SchemaId=0</p>
<p>The Guid you receive is the name the file will have on disk. If you get more than one Guid then you have more than one version of the file.</p>
<p>If you wish to go the other way around. From filename on disk to pkID in tblItem. Run this:</p>
<p>exec RelationListTo @ToId=N'GuidOnFileName',@SchemaId=0</p>
<p> </p>
<p>Thanks for Greger for giving me the first part and to Shahid for answering the same question over and over (I should be able to look it up myself from now on =) )</p>Ever needed the process id of the applicationPool?/blogs/Petter-Klang/Dates/2009/6/Ever-needed-the-process-id-of-the-applicationPool/2009-06-16T11:40:57.4730000Z<p>I often find myself debugging sites that run on machines that have a lot of sites up and running. So when I need to attach my VS to the process I usually have at least three (often more) w3wp.exe processes running. A neat little command that my colleague Sebastian gave me the other day has helped me a lot. “iisapp” run this command in a command window and it will give you a list of all the process ids for the applicationPools. </p> <p><a href="/link/7e868c82fab24b6c88489e0d83951d61.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="122" alt="image" src="/link/8c03f6c132d9434ba48319a46ddff8f7.png" width="244" border="0" /></a> </p> <p>iisapp seems to only work for Windows server. But for vista “appcmd.exe list wp” gives the same result. Not as easy to remember but still. </p> <p><a href="/link/4a4c76b6158d44778bd5710ab2a608a5.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="121" alt="image" src="/link/1253b554e04d46078747f71b06e4268f.png" width="244" border="0" /></a> </p> <p>Nothing big but though I would share as it helped me a lot.</p>Buttons out of place in Edit mode when using Internet Explorer 6/blogs/Petter-Klang/Dates/2009/2/Buttons-out-of-place-in-Edit-mode-when-using-Internet-Explorer-6/2009-02-02T16:49:03.6100000Z<p> Ever had any trouble with the icons in Edit mode getting in the way of each other?</p> <p><a href="/link/6191953c6d8f4d509ca62337c7f501f0.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="82" alt="epi5IE6" src="/link/fb51c81ad8b94820bfd8e88c564625cc.jpg" width="244" border="0" /></a></p> <p> </p> <p>If you get this behavior make sure that you have the \App_Browsers\IE6.browser file in your website. And that it is accessible by the IIS. This file specifies an adapter to EPiServer.UI.WebControls.ToolButton for IE6 so that it will render correctly </p>Filemanger slow/blogs/Petter-Klang/Dates/2008/12/Filemanger-slow/2008-12-05T10:29:25.0000000Z<p>Wednesdays was a hectic day at support. Within two hours cases came in from right and left from partners all reporting about the same problem. The Filemanager was slow and sluggish. First thought was that there had been an update from Microsoft that was causing the issue. But after getting access to some of the sites and trying from here and not getting the same result we started to think it was something with client setup. After some digging around we found an old (sep 2005) <a href="http://support.microsoft.com/kb/323207">KB</a> from Microsoft talking about how Internet Explorer will act for Ocget.dll and .cab files. So funny thing about IE is that it will always assume that the CODEBASE parameter may not be correct and there for it will go to Microsoft's servers to try and find the CODEBASE. Changing a registry key you can get IE to stop asking the servers for the CODEBASE. </p><p>What we think happened on Wednesday was that Microsoft servers went down, as <a href="http://www.fiddler2.com/fiddler2/version.asp?ver=2.1.6.2&IsBeta=False">fiddler</a> was giving us 404 and 502 from the servers. This caused a lot of customers to get a 30 second stall until the server gave the response. When we were trying from here we also got the 404 but for us it only took 1 second to get the response. </p><p>Anyway on Thursday we got reports that the problem had solved itself so the server seems to be back up. The change in the KB worked for the people that tried it on Wednesday. </p>