Pode icon indicating copy to clipboard operation
Pode copied to clipboard

Kestrel don't work (ERR_CONNECTION_REFUSED)

Open abolinhas opened this issue 2 years ago • 3 comments

Describe the Bug

When i use -ListenerType Kestrel the browser return ERR_CONNECTION_REFUSED, it works correctly without Kestrel.

Steps To Reproduce

Steps to reproduce the behavior:

#Start Pode Server
Import-Module ActiveDirectory
Import-Module -Name Pode.Kestrel
Start-PodeServer -Threads 2 -ListenerType Kestrel {

    #Attach port 8000 to the local machine address and use HTTP protocol
    Add-PodeEndpoint -Address 192.168.60.30 -Port 8083 -Protocol Http
    Set-PodeViewEngine -Type HTML
    #Create route and return a static value
    Add-PodeRoute -Method Get -Path '/static' -ScriptBlock {
        $data = Get-ADUser -LDAPFilter '(&(samaccountname=administrator)(memberof=CN=Domain Admins,CN=Users,DC=stie2,DC=articatech,DC=local))' -Server stie2.articatech.local
        if($data.Count -eq 0) {
            Write-PodeTextResponse -Value 'false' -Cache -MaxAge 1800
        }
        else {
            Write-PodeTextResponse -Value 'true' -Cache -MaxAge 1800
        }  
       
    }
}

Screenshots

Screenshot_65

Platform

  • OS: Windows Server
  • Browser: Chrome
  • Versions:
    • Pode: Lasted
    • PowerShell: 7

abolinhas avatar Nov 21 '22 00:11 abolinhas

Hi @abolinhas,

What happens if you try a * or 127.0.0.1 address for the endpoint?

Badgerati avatar Nov 24 '22 21:11 Badgerati

Hi Same issue using * or 127.0.0.1

abolinhas avatar Nov 25 '22 11:11 abolinhas

Hi @abolinhas,

I'll have to investigate when I get chance.

Badgerati avatar Nov 27 '22 15:11 Badgerati