This document describes the steps that must be followed to run LitwareHR on a WindowsXP box for evaluation purposes.

Important Update (March 8, 2007): If you want to evaluate LitwareHR under Windows XP, you can download the installer here. you can use this document as reference of the application changes needed.

The Issue

LitwareHR uses many websites (www.litware.com, www.litwarehr.com, etc.). Windows XP's IIS 5.1 does not allow multiple websites. Notice that LitwareHR was designed and built to leverage the features of Windows Server 2003 Server, the most likely platform to find on a real world, production datacenter.

Approach taken

Basically each Windows Server 2003 LitwareHR’s website is now a Virtual directory in Windows XP. The instructions below allow you to workaroud this issue for the datacenter and tenant provisioning. We will update the source code and publish a new MSI soon, but if you want to test and evaluate LitwareHR on Windows XP today, please follow the steps below.

Application changes

After running LitwareHR.msi file, the following changes are needed in order to be able to run LitwareHR on Windows XP.

1. IIS Structure

WindowsXP_IIS.png
1.1. Create a folder inside of %INSTALL_DIR%\Src\ named "EmptyVD"

1.2. Create the following virtual directories inside of the default Website:
Alias Directory Allow
contoso %INSTALL_DIR%\Src\Contoso\Contoso.WebSite "Read" and "Run Scripts"
fabrikam %INSTALL_DIR%\Src\Fabrikam\Fabrikam.WebSite "Read" and "Run Scripts"
litware %INSTALL_DIR%\Src\Litware\Litware.WebSite "Read" and "Run Scripts"
litwarehr %INSTALL_DIR%\Src\EmptyVD "Read" and "Run Scripts"
services.litwarehr %INSTALL_DIR%\Src\EmptyVD "Read" and "Run Scripts"


1.3. Create the following virtual directories inside of services.litwarehr virtual directory:
Alias Directory Allow
Authorization %INSTALL_DIR%\Src\Litware\LitwareHR.Authorization.SVCHost "Read" and "Run Scripts"
Authentication %INSTALL_DIR%\Src\Litware\LitwareHR.Authentication.SVCHost "Read" and "Run Scripts"
SecureHost %INSTALL_DIR%\Src\Litware\LitwareHR.Portfolio.SecureHost "Read" and "Run Scripts"
UnSecureHost %INSTALL_DIR%\Src\Litware\LitwareHR.Portfolio.UnSecureHost "Read" and "Run Scripts"

2. Urls

Url's references all over the project have to change in order to point to the new ones (Windows XP's):
Windows 2003 Windows XP
http://www.contoso.com http://localhost/contoso
http://www.fabrikam.com http://localhost/fabrikam
http://www.litware.com http://localhost/litware
http://www.litwarehr.com http://localhost/litwarehr
http://services.litwarehr.com http://localhost/services.litwarehr

2.1. Urls in the solution code
2.1.1. Open the LitwareHR.sln located in %INSTALL_DIR%\Src\Litware
2.1.2. Use the "Edit -> Find and Replace -> Replace in files" tool in order to replace Windows 2003 urls of the prior table to Windows XP ones
2.1.3. Save the changed files
2.2. Urls in tenant's institutional websites
2.2.1. Open %INSTALL_DIR%\Src\Contoso\Contoso.WebSite\default.htm file for edit.
2.2.2. Replace all the occurrences of "http://www.contoso.com" to "http://localhost/contoso"
2.2.3. Replace all the occurrences of "http://www.litwarehr.com" to "http://localhost/litwarehr" and save the file
2.2.4. Save the file

2.2.5. Open %INSTALL_DIR%\Src\Fabrikam\Fabrikam.WebSite\default.htm file for edit
2.2.6. Replace all the occurrences of "http://www.fabrikam.com" to "http://localhost/fabrikam"
2.2.7. Replace all the occurrences of "http://www.litwarehr.com" to "http://localhost/litwarehr" and save the file
2.2.8. Save the file

2.2.9. Open %INSTALL_DIR%\Src\Contoso\Contoso.WebSite\Css\main.css file for edit
2.2.10. Replace all the occurrences of "http://www.contoso.com" to "http://localhost/contoso"
2.2.11. Save the file

2.2.12. Open %INSTALL_DIR%\Src\Fabrikam\Fabrikam.WebSite\Css\main.css file for edit.
2.2.13. Replace all the occurrences of "http://www.fabrikam.com" to "http://localhost/fabrikam"
2.2.14. Save the file.
2.3. Urls in the provisioning scripts
2.3.1. Open %INSTALLDIR%\Setup\DataCenter\Runtime\MetadataStoreCreateTenantMetadataStore.sql file for edit
2.3.2. Replace all the occurrences of "http://www.litware.com" to "http://localhost/litware"
2.3.3. Replace all the occurrences of "http://www.litwarehr.com" to "http://localhost/litwarehr"
2.3.4. Replace all the occurrences of "http://www.'' @tenantAlias ''.com/
" to "http://localhost/'' @tenantAlias ''/"
2.3.5. Save the file

3. WebServer WebSite Identifier

Now we use the Default website which is the only web site available in IIS 5.1. that is why the WebServerWebSiteIdentifier value in LitwareHR.Portfolio.UnSecureHost config file must change.
3.1. Open %INSTALL_DIR%\Src\Litware\LitwareHR.Portfolio.UnSecureHost\Web.config for edit
3.2. Assign WebServerWebSiteIdentifier = "1"
3.3. Assign AppServerWebSiteIdentifier = "1"
3.4. Save the file

4. Tenant alias

Since the tenant pubic and private sites now have different urls, the way of getting the tenant alias out of it changes too.
4.1. Open %INSTALLDIR%\Src\Litware\LitwareHR.PublicApp.WebUX\appCode\Helpers.cs
4.2. Replace the following code:
            string str = HttpContext.Current.Request.Url.Segments[1];

with this one:
            string str;
            if (HttpContext.Current.Request.IsLocal)
            {
                str = HttpContext.Current.Request.Url.Segments[2];
            }
            else 
            {
                str = HttpContext.Current.Request.Url.Segments[1];
            }

4.3. Replace the following code:
            string domain = HttpContext.Current.Request.Url.Segments[1];

with this one:
            string domain;
            if (HttpContext.Current.Request.IsLocal)
            {
                domain = HttpContext.Current.Request.Url.Segments[2];
            }
            else 
            {
                domain = HttpContext.Current.Request.Url.Segments[1];
            }

4.4. Save the file
4.5. Follow steps 4.1 to 4.4 for with following file: %INSTALLDIR%\Src\Litware\LitwareHR.PrivateApp.WebUX\appCode\Helpers.cs
4.6. Follow step 4.3 with the following file: %INSTALLDIR%\Src\Litware\LitwareHR.WebSite\appCode\Helpers.cs
4.7. Save the file

5. "NETWORK SERVICE" user changes to "%LOCAL_MACHINE%\ASPNET"

5.1 In DataCenter Provisioning Scripts
5.1.1. Open %INSTALLDIR%\Setup\DataCenter\Runtime\DataStoreAddTrustedSubsystemAccount.sql for edit
5.1.2. Replace all the occurrences of "NT Authority\NETWORK SERVICE" to "%COMPUTER_NAME%\ASPNET". For example, if your computer name is "JOHN-XP", you should use "JOHN-XP\ASPNET"
5.1.3. Save the file
5.1.4. Follow steps 5.1.2 and 5.1.3 for %INSTALLDIR%\Setup\DataCenter\Runtime\MetaDataStoreAddTrustedSubsystemAccount.sql
5.1.5. Follow steps 5.1.2 and 5.1.3 for %INSTALLDIR%\Setup\DataCenter\Runtime\WorkflowStoreAddTrustedSubsystemAccount.sql
5.2 In SQL Server instance
5.2.1. Make sure that the "%COMPUTER_NAME%\ASPNET" account belongs to the security logins of the SQL instance

6. MSDTC Service

In order to avoid "MSDTC on server 'servername' is unavailable." error, start the Distributed Transaction Coordinator service.

7. Tenant Provisioning Code

Since we are going to manually create the tenant structure on the IIS on every tenant provisioning, that piece of code must be commented.
7.1. Open Src\Litware\LitwareHR.Portfolio.Services\ProvisioningService.cs for edit
7.2. Inside of the DoProvisioning method, comment the following line:
PerformWebServerProvisioning(tenantAlias);
7.3. Save the file

8. Considerations when following readme instructions

8.1. In section I.b, III.b and III.c: use "%LOCAL_MACHINE%\ASPNET" instead of "NETWORK SERVICE"
8.2. In section III.d:
8.2.1. Take into account the url changes: instead of "www.litware.com" it is just "litware", etc
8.2.2. Do not follow III.d.2 instructions
8.3. In section IV.a, the website identifier is "1"

9. Important: Tenant Provisioning

When using the application, every time you create a tenant account (Tenant Provisioning) from the Litware website (http://localhost/litware/), make sure to create the tenant virtual directory structure in the IIS manually:
9.1. Open Internet Information Services manager
9.2. Locate the litwarehr virtual directory, right-click it and select New -> Virtual Directory...
9.3. Enter the following information:
Alias Directory Allow
The one entered in http://localhost/litware; in Organization information form %INSTALL_DIR%\Src\EmptyVD "Read" only


9.4. Locate the tenant virtual folder (the one recently created), right-click it and select New -> Virtual Directory...
9.5. Enter the following information:
Alias Directory Allow
public %INSTALL_DIR%\Src\Litware\LitwareHR.PublicApp.WebUX "Read" and "Run Scripts"


4. Locate the tenant virtual folder, right-click it and select New -> Virtual Directory...
5. Enter the following information:
Alias Directory Allow
private %INSTALL_DIR%\Src\Litware\LitwareHR.PrivateApp.WebUX "Read" and "Run Scripts"

Last edited Mar 8, 2007 at 5:04 PM by aschapiro, version 7

Comments

No comments yet.