18 July 2013

Umbraco: Notes

Install

I had a few niggles with Umbraco CMS Install.

Using a separate database server

    • Don't use the WebInstaller. For some reason although there are options to set the remote db server it fails to connect. Follow the manual install process instead.
    • Change the permissions on the web.config to allow writing by the install process otherwise it will get stuck on "5% connecting to the database".

Multiple Websites

  • Domain 'mydomain.com' has already been assigned: 
    • Original site exists: Manage the Hostnames of the site it is assigned to and remove it
    • Original site deleted: Undelete it then manage hostnames
    • Original site deleted from Recycle bin: re-cycle app pool

Folder Permissions

I had some issues with permissions on folders/files.
To check permissions you can apparently add the following to the Umbraco site's URL:
/install/default.aspx?installStep=validatePermissions
Although it didn't work for me.
There are command line scripts to check/correc them e.g.:
http://our.umbraco.org/wiki/install-and-setup/set-umbraco-folder-permissions-from-command-line

For a Win2008R2 system with IIS7 save the following to a bat file and run in the website folder, replacing [ApplicationPoolName]:
REM Following line in original script incorrectly sets all child folder permissions
REM icacls . /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls app_code /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)RX
icacls app_browsers /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)RX
icacls app_data /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls bin /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)R
icacls config /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls css /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls data /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls masterpages /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls media /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls python /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls scripts /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls [ApplicationPoolName] /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls usercontrols /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)R
icacls xslt /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls views /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls web.config /grant "IIS APPPOOL\[ApplicationPoolName]":(OI)(CI)M
icacls web.config /grant "IIS APPPOOL\[ApplicationPoolName]":M
REM If you have installed the Robots.txt editor package you need the following line too
REM icacls robots.txt /grant "IIS APPPOOL\[ApplicationPoolName]":M

MSSQL SERVER: Check SQL Connection Without Installing Anything

Problem
You need to check the SQL connection from a web server to a database server but don't want to install unnecessary programs (e.g. SQL Server Management Studio).

Solution

  1. Create a file called SQLConnectionCheck.udl
  2. Run it (double click or Enter)
  3. Enter the SQL connection parameters
  4. Click Test Connection

17 July 2013

XenServer: Clone a Virtual Machine

Source in part: http://support.citrix.com/
VMInstallationGuide.pdf

  1. Create, install, and configure the Windows VM as desired, applying all relevant Service Packs and updates. 
  2.  Install the XenServer drivers. 
  3.  Run C:\Windows\System32\sysprep\sysprep.exe: 
    1. Ensure ‘System Out-of-Box Experience (OOBE)’ is selected 
    2. Tick the ‘Generalize’ option (this resets the SID) 
    3. Select ‘Shutdown’ from the Shutdown Options (shuts down the VM when completes)
  4. In XenCenter, convert the VM into a template by right clicking on it. 
  5. When the cloned VM starts, it will get a new system ID and name, then run a mini-setup to prompt for configuration values as necessary, and finally restart, before being available for use. 
NB: The original, sysprepped VM should not be restarted again after the sysprep stage, and should be converted to a template immediately afterwards to prevent this. If the source VM is restarted, sysprep must be run on it again before it can be safely used to make additional clones.