Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
73 lines (52 loc) · 2.31 KB

File metadata and controls

73 lines (52 loc) · 2.31 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Import-Module WebAdministration
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | out-null
$currentPath = Split-Path $script:MyInvocation.MyCommand.Path
$variables = Join-Path $currentPath "\Variables.ps1"
. $variables
. $iisModule
. $sqlModule
. $functionsModule
write-output "------- Installing Sitefinity --------"
EnsureDBDeleted $databaseServer $databaseName
DeleteAllSitesWithSameBinding $defaultWebsitePort
write-output "Setting up Application pool..."
Remove-WebAppPool $appPollName -ErrorAction continue
New-WebAppPool $appPollName -Force
Set-ItemProperty IIS:\AppPools\$appPollName managedRuntimeVersion v4.0 -Force
#Setting application pool identity to NetworkService
Set-ItemProperty IIS:\AppPools\$appPollName processmodel.identityType -Value 2
write-output "Deploy SitefinityWebApp to test execution machine $machineName"
if (Test-Path $defaultWebsiteRootDirectory){
CleanWebsiteDirectory $defaultWebsiteRootDirectory 10 $appPollName
}
write-output "Sitefinity deploying from $projectLocationShare..."
Copy-Item -Path Microsoft.PowerShell.Core\FileSystem::$projectLocationShare $projectDeploymentDirectory -Recurse -ErrorAction stop
write-output "Sitefinity successfully deployed."
function CopyTestAssemblies($workingDirectory, $destinationDirectory)
{
write-output "Start copying test assemblies from $workingDirectory to $destinationDirectory."
Get-ChildItem *Test*.dll -recurse -path $workingDirectory | Copy-Item -destination $destinationDirectory
}
function InstallSitefinity()
{
$siteId = GetNextWebsiteId
write-output "Registering $siteName website with id $siteId in IIS."
New-WebSite -Id $siteId -Name $siteName -Port $defaultWebsitePort -HostHeader localhost -PhysicalPath $defaultWebsiteRootDirectory -ApplicationPool $appPollName -Force
Start-WebSite -Name $siteName
write-output "Setting up Sitefinity..."
$installed = $false
while(!$installed){
try{
$response = GetRequest $defaultWebsiteUrl
if($response.StatusCode -eq "OK"){
$installed = $true;
$response
}
}catch [Exception]{
Restart-WebAppPool $appPollName -ErrorAction Continue
write-output "$_.Exception.Message"
$installed = $false
}
}
write-output "----- Sitefinity successfully installed ------"
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.