-
Notifications
You must be signed in to change notification settings - Fork 114
stop-polaris not stopping the web server over 8080 or any port it's started with. #198
Comments
Any update on this issue/bug? |
Hi Harikanth, would you be able to take a look at the PR? |
Hi,
Sorry for the late reply.
Actually I was using the Polaris in wrong way. I was calling the
"Start-Polaris -Port 8080" at the end of the script. And when I run it 2nd
time it use to throw that error.
This was the script I am using "PolarisGet3-v1.ps1"
Add-Type -AssemblyName System.Web
New-PolarisGetRoute -Path "/getdata" -Scriptblock {
$response.SetContentType('text/html')
#$html = . "C:\Users\harikant\Documents\ProjectFMC\Content.ps1"
$Html = . "C:\Users\harikant\Documents\ProjectFMC\mainTest.ps1"
#$Html = . "C:\Users\harikant\Documents\ProjectFMC\mainTest-v2.ps1"
$Response.Send($Html)
}
New-PolarisPostRoute -Path "/home" -Scriptblock {
$Response.SetContentType('application/json')
$Body = [System.Web.HttpUtility]::UrlDecode($Request.BodyString)
$Data = @{}
$Body.split('&') | Where-Object{
$part = $_.split('=')
$Data.add($part[0], $part[1])
}
$Response.Send(($Data | ConvertTo-Json))
}
#Start-Polaris -Port 8080
I have one question. If I make some changes to mainText.ps1 script and run
PolarisGet3-v1.ps1 do I need to this clear the route using this command
"Remove-PolarisRoute" and run PolarisGet3-v1.ps1?
Regards,
Harikanth
…On Thu, Oct 31, 2019 at 6:44 AM Micah Rairdon ***@***.***> wrote:
Hi Harikanth, would you be able to take a look at the PR?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#198?email_source=notifications&email_token=ADCB2QOMRMY7CXVJEKTKYXLQRIWN5A5CNFSM4I4LQ7LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECWICRQ#issuecomment-548176198>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCB2QIRJ2NWMIPQN6YXHJTQRIWN5ANCNFSM4I4LQ7LA>
.
|
If you want to try the code in PR #200 it should let you call Start-Polaris multiple times without any negative effects. To answer your question though you can either use |
@Tiberriver256 Thanks so much for your answers. |
I used the code from PR #200 but had to remove $Hostname from |
Polaris Bug Report
After running Stop-Polaris and when try to re-start the (start-Polaris) it will throw an error.
Description of the bug
Stop-Polaris is not stopping web server on whichever port its started with. I get a below when try to run Start-polaris
A clear and concise description of what the bug is.
Steps to reproduce
Example when you run the below code
And run Stop-Polaris and again try to start-polaris command it thows the above error.
Expected behavior
To be able to stop and start the Polaris server without any errors.
Version Information
PSVersion : 5.1.17134.858
PSEdition : Desktop
PSCompatibleVersions : {1.0, 2.0, 3.0, 4.0...}
BuildVersion : 10.0.17134.858
CLRVersion : 4.0.30319.42000
WSManStackVersion : 3.0
PSRemotingProtocolVersion : 2.3
SerializationVersion : 1.1.0.1
The text was updated successfully, but these errors were encountered: