Git Product home page Git Product logo

Comments (16)

tysonjhayes avatar tysonjhayes commented on June 6, 2024

Hi @nzspambot - If you are using the xWebAdministration dev branch it should be generating a log file at $env:\tmp\xwebadministration.log - could you attach that so we can begin the debugging process? Might be easier to delete the file and rerun the invoke.

I ask for this as I'm not seeing much of the verbose messaging that should be in the resource around xWebsite.

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

yeah cool; that file is pretty empty but only has these two lines:

11/24/2015 08:13:17: Protocol is Incorrect
11/24/2015 08:13:17: Protocol is Incorrect

which is cool; let me trace that in the resource

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

ok some more debug

# Single binding

Works as expected

# 2 HTTP Bindings

11/24/2015 09:08:12: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:08:12: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:08:12: @{Port=80; CertificateStoreName=; CertificateThumbprint=; IPAddress=*; HostName=sometest.test.com.au; sslFlags=0; Protocol=http} to be tested
11/24/2015 09:08:12: @{Port=80; CertificateStoreName=; CertificateThumbprint=; IPAddress=*; HostName=sometest.test.com.au; sslFlags=0; Protocol=http} to be tested
11/24/2015 09:08:12: HostName is incorrect
11/24/2015 09:08:12: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:08:12: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:08:12: @{Port=80; CertificateStoreName=; CertificateThumbprint=; IPAddress=*; HostName=sometest.test.com.au; sslFlags=0; Protocol=http} to be tested
11/24/2015 09:08:12: @{Port=80; CertificateStoreName=; CertificateThumbprint=; IPAddress=*; HostName=sometest.test.com.au; sslFlags=0; Protocol=http} to be tested
11/24/2015 09:08:12: HostName is incorrect
11/24/2015 09:08:14: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:08:14: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:08:14: http http is the protocol (actual)
11/24/2015 09:08:14:  VS http (cim)
11/24/2015 09:08:14:  and bool Equals(System.Object obj) int GetHashCode() type GetType() string ToString() string CertificateStoreName= string CertificateThumbprint= string HostName=sometest.test.com.au string IPAddress=* string Port=80 string Protocol=http long sslFlags=0 (just the var)
11/24/2015 09:08:14: Protocol is Incorrect

# 1 HTTP 1 HTTPS

11/24/2015 09:09:42: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:09:42: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:09:42: http http is the protocol (actual)
11/24/2015 09:09:42:  VS http (cim)
11/24/2015 09:09:42:  and bool Equals(System.Object obj) int GetHashCode() type GetType() string ToString() string CertificateStoreName= string CertificateThumbprint= string HostName=sometest.test.com.au string IPAddress=* string Port=80 string Protocol=http long sslFlags=0 (just the var)
11/24/2015 09:09:42: Protocol is Incorrect
11/24/2015 09:09:42: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:09:42: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:09:42: http http is the protocol (actual)
11/24/2015 09:09:42:  VS http (cim)
11/24/2015 09:09:42:  and bool Equals(System.Object obj) int GetHashCode() type GetType() string ToString() string CertificateStoreName= string CertificateThumbprint= string HostName=sometest.test.com.au string IPAddress=* string Port=80 string Protocol=http long sslFlags=0 (just the var)
11/24/2015 09:09:42: Protocol is Incorrect

# 2 HTTP 1 HTTPS

11/24/2015 09:10:57: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:10:57: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:10:57: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:10:57: http http is the protocol (actual)
11/24/2015 09:10:57:  VS http (cim)
11/24/2015 09:10:57:  and bool Equals(System.Object obj) int GetHashCode() type GetType() string ToString() string CertificateStoreName= string CertificateThumbprint= string HostName=sometest.test.com.au string IPAddress=* string Port=80 string Protocol=http long sslFlags=0 (just the var)
11/24/2015 09:10:57: Protocol is Incorrect
11/24/2015 09:10:57: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:10:57: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:10:57: Microsoft.IIs.PowerShell.Framework.ConfigurationElement to be tested
11/24/2015 09:10:57: http http is the protocol (actual)
11/24/2015 09:10:57:  VS http (cim)
11/24/2015 09:10:57:  and bool Equals(System.Object obj) int GetHashCode() type GetType() string ToString() string CertificateStoreName= string CertificateThumbprint= string HostName=sometest.test.com.au string IPAddress=* string Port=80 string Protocol=http long sslFlags=0 (just the var)
11/24/2015 09:10:57: Protocol is Incorrect

it appears ( well to me ) that this resource has issues with multiple bindings in and around how it is evaluated

also this here

http http is the protocol (actual)

as well as this also

HostName is incorrect

is rather interesting.

Once I have more info I will update this

thanks

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

OK think I have found the issue here

So what I did was try this out

$1 = $ActualBinding.Protocol
$2 = $binding.CimInstanceProperties['Protocol'].Value

then ran some different if statements

    if($1 -ne $2)
    {
        Write-Log "hidden var vs hidden cim" -file
        Write-Log "Protocol is Incorrect" -File
        $BindingNeedsUpdating = $true
        break
    }
    if([string]$ActualBinding.Protocol -ne $2)
    {
        Write-Log "not hidden var vs hidden cim" -file
        Write-Log "Protocol is Incorrect" -File
        $BindingNeedsUpdating = $true
        break
    }
    if($1 -ne [string]$binding.CimInstanceProperties['Protocol'].Value)
    {
        Write-Log "hidden var vs not hidden cim" -file
        Write-Log "Protocol is Incorrect" -File
        $BindingNeedsUpdating = $true
        break
    }

    if([string]$ActualBinding.Protocol -ne [string]$binding.CimInstanceProperties['Protocol'].Value)
    {
        Write-Log "default test" -file
        Write-Log "Protocol is Incorrect" -File
        $BindingNeedsUpdating = $true
        break
    }

So you can see I was testing if what is evaluated that it is coming through correct and it bombs out at

11/24/2015 10:01:38: not hidden var vs hidden cim
11/24/2015 10:01:38: Protocol is Incorrect

Appears not to be; @tysonjhayes are you able to confirm my findings?

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

possible (nasty?) workaround

$1b = $ActualBinding
$2b = $binding
if($1b.Protocol -ne $2b.CimInstanceProperties['Protocol'].Value)
    {
        Write-Log "semi var vs semi var" -file
        Write-Log "Protocol is Incorrect" -File
        $BindingNeedsUpdating = $true
        break
    }

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

Had a chance to test

$1b = $ActualBinding
$2b = $binding

can confirm that the workaround above works as expected.

@tysonjhayes would you be open to reviewing a pull request around this?

from webadministrationdsc.

tysonjhayes avatar tysonjhayes commented on June 6, 2024

Yes I would be open to reviewing a pull request mostly so I can understand the logic and flow of this better. Please also add pester tests around the change as well.

from webadministrationdsc.

SNikalaichyk avatar SNikalaichyk commented on June 6, 2024

This issue is reproducible when a site has multiple bindings that are targeting to the same port.

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

@SNikalaichyk in my testing it is when a site has multiple bindings eg 1xhttp and 1xhttps binding will cause this issue

from webadministrationdsc.

SNikalaichyk avatar SNikalaichyk commented on June 6, 2024

Tomorrow I am going to submit a pull request to address this issue. Currently working on updating Pester unit tests.

from webadministrationdsc.

tysonjhayes avatar tysonjhayes commented on June 6, 2024

Thanks everyone for looking at this I'll try to give it some attention once I get the PR.

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

@tysonjhayes yes sorry been a bit busy else where in regards to a PR; currently looking at it but will wait for @SNikalaichyk PR tomorrow to cross check with what I have found so far

from webadministrationdsc.

tysonjhayes avatar tysonjhayes commented on June 6, 2024

@nzspambot - @SNikalaichyk gave us a PR, it looks pretty good to me, do you want to take a pass to make sure it solves your issue?

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

Can do, give me a couple of hours

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

Confirmed after testing #65 and after these tests:

Testing shows:

Single HTTP Binding : PASS
Double HTTP Binding : PASS 
Single HTTP and Single HTTPS : PASS 
Double HTTP and Single HTTPS : PASS
Single HTTP and Double HTTPS : PASS
Double HTTP and Double HTTPS : PASS

that the issue is fixed

from webadministrationdsc.

nzspambot avatar nzspambot commented on June 6, 2024

Has been merged; big thanks @SNikalaichyk and @tysonjhayes for this

from webadministrationdsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.