6clhnq
Last Updated: February 25, 2016
·
596
· jgemedina

Another PS script to host a .NET 4.x app using Mono/XSP

$XspHostAddress = "127.0.0.1"
$XspHostPort = "8000"
$WebAppRoot = "Path/To/App/Root"

function Debug
{
    Invoke-Expression 'xsp4 --address $XspHostAddress --port $XspHostPort --root "$WebAppRoot"'
}

function LaunchBrowser
{
    $browser = New-Object -ComObject InternetExplorer.Application
    $browser.Navigate2([String]::Format("http://{0}:{1}", $XspHostAddress, $XspHostPort))
    $browser.Visible = $true
}

LaunchBrowser
Debug