You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
885B

  1. param(
  2. [string]$IisExpressPath = "$env:ProgramFiles\IIS Express\iisexpress.exe",
  3. [string]$ConfigPath = "$(Join-Path $PSScriptRoot 'applicationhost.config')",
  4. [string]$SiteName = "AspClassicPublicSite",
  5. [switch]$TraceErrors
  6. )
  7. & (Join-Path $PSScriptRoot 'build-iisexpress-config.ps1') -OutputPath $ConfigPath
  8. if ($LASTEXITCODE -ne 0) {
  9. exit $LASTEXITCODE
  10. }
  11. if (-not (Test-Path -LiteralPath $IisExpressPath)) {
  12. $IisExpressPath = "$env:ProgramFiles(x86)\IIS Express\iisexpress.exe"
  13. }
  14. if (-not (Test-Path -LiteralPath $IisExpressPath)) {
  15. Write-Error "IIS Express not found. Checked Program Files and Program Files (x86)."
  16. exit 1
  17. }
  18. $arguments = @("/config:$ConfigPath", "/site:$SiteName")
  19. if ($TraceErrors) {
  20. $arguments += "/trace:error"
  21. }
  22. Write-Host "Starting IIS Express site '$SiteName' using config '$ConfigPath'..."
  23. & $IisExpressPath @arguments

Powered by TurnKey Linux.