Comments (16)
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.
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.
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.
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.
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.
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.
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.
This issue is reproducible when a site has multiple bindings that are targeting to the same port.
from webadministrationdsc.
@SNikalaichyk in my testing it is when a site has multiple bindings eg 1xhttp and 1xhttps binding will cause this issue
from webadministrationdsc.
Tomorrow I am going to submit a pull request to address this issue. Currently working on updating Pester unit tests.
from webadministrationdsc.
Thanks everyone for looking at this I'll try to give it some attention once I get the PR.
from webadministrationdsc.
@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.
@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.
Can do, give me a couple of hours
from webadministrationdsc.
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.
Has been merged; big thanks @SNikalaichyk and @tysonjhayes for this
from webadministrationdsc.
Related Issues (20)
- xWebConfigPropertyCollection: Adding system.webServer/security/authorization fails Test-TargetResource HOT 3
- xWebAdministration: Rename master branch to main
- Parameter 'PhysicalPath' should point to existing path, on Azure File Share HOT 4
- Unable to configure IIS using PowerShell DSC Resource xWebAdministration v3.20 HOT 3
- Can you set multiple file extensions to allowed for request filtering? HOT 1
- Suported? - xWebSite - Windows Authentication - Advanced Settings/Providers HOT 2
- WebApplication: Integration test failing
- How to add credentials with empty password in xWebAppPool. HOT 2
- Confusing package names in PowerShell Gallery HOT 5
- Name will not take ".Net6 Core ", Net6 Core works but want the "." HOT 1
- WebAppPoolDefaults : Add Missing Configuration Items
- xWebAppPool and xWebApplication cannot delete entities in use and do nothing HOT 1
- Website: PowerShell DSC resource DSC_WebSite failed to execute Test-TargetResource functionality with error message: System.Exception: Please ensure that the PowerShell module 'WebAdministration' is installed.
- Website: unable to change advanced Authentication Settings HOT 1
- IisFeatureDelegation wipes out config HOT 1
- IIS site binding new SSL flags
- IisMimeTypeMapping ansible config? HOT 1
- WebAdministrationDsc: Move historic change log back to the file CHANGELOG.md
- WebConfigPropertyCollection needs to allow null or empty strings for specific collection items like '/system.webServer/security/requestFiltering/hiddenSegments'
- IisModule - Using to remove at server level doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webadministrationdsc.