{"action":"closed","issue":{"url":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/134","repository_url":"https://api.github.com/repos/PowerShell/xWebAdministration","labels_url":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/134/comments","events_url":"https://api.github.com/repos/PowerShell/xWebAdministration/issues/134/events","html_url":"https://github.com/PowerShell/xWebAdministration/issues/134","id":156088451,"number":134,"title":"xWebsite SSL Bindings behaviour","user":{"login":"nzspambot","id":8730013,"avatar_url":"https://avatars.githubusercontent.com/u/8730013?v=3","gravatar_id":"","url":"https://api.github.com/users/nzspambot","html_url":"https://github.com/nzspambot","followers_url":"https://api.github.com/users/nzspambot/followers","following_url":"https://api.github.com/users/nzspambot/following{/other_user}","gists_url":"https://api.github.com/users/nzspambot/gists{/gist_id}","starred_url":"https://api.github.com/users/nzspambot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzspambot/subscriptions","organizations_url":"https://api.github.com/users/nzspambot/orgs","repos_url":"https://api.github.com/users/nzspambot/repos","events_url":"https://api.github.com/users/nzspambot/events{/privacy}","received_events_url":"https://api.github.com/users/nzspambot/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-21T07:12:11Z","updated_at":"2016-05-25T10:37:07Z","closed_at":"2016-05-25T10:37:07Z","body":"@SNikalaichyk Can I get your feedback on this?\r\n\r\nWriting some xWebsite Integration tests and have noticed this:\r\n\r\nWorks:\r\n\r\n```\r\n$BindingInfo = @(\r\n    New-CimInstance -ClassName MSFT_xWebBindingInformation -Namespace root/microsoft/Windows/DesiredStateConfiguration -Property @{\r\n        Protocol              = 'http'\r\n        IPAddress             = '*'\r\n        Port                  = 80\r\n        HostName              = 'http1.website'\r\n    } -ClientOnly\r\n\r\n    New-CimInstance -ClassName MSFT_xWebBindingInformation -Namespace root/microsoft/Windows/DesiredStateConfiguration -Property @{\r\n        Protocol              = 'http'\r\n        IPAddress             = '*'\r\n        Port                  = 80\r\n        HostName              = 'http2.website'\r\n    } -ClientOnly\r\n\r\n    New-CimInstance -ClassName MSFT_xWebBindingInformation -Namespace root/microsoft/Windows/DesiredStateConfiguration -Property @{\r\n        Protocol              = 'https'\r\n        IPAddress             = '*'\r\n        Port                  = 443\r\n        HostName              = 'https.website'\r\n        CertificateThumbprint = 'ACFF44F061DBB4E6D75367BFDD773EFA71431E40'\r\n        CertificateStoreName  = 'MY'\r\n        SslFlags              = 1\r\n    } -ClientOnly\r\n)\r\n\r\nUpdate-WebsiteBinding -Name Website -BindingInfo $BindingInfo\r\n```\r\n\r\nDoes not work (no SNI on HTTPS bindings):\r\n\r\n```\r\n$BindingInfo = @(\r\n    New-CimInstance -ClassName MSFT_xWebBindingInformation -Namespace root/microsoft/Windows/DesiredStateConfiguration -Property @{\r\n        Protocol              = 'http'\r\n        IPAddress             = '*'\r\n        Port                  = 80\r\n        HostName              = 'http1.website'\r\n    } -ClientOnly\r\n\r\n    New-CimInstance -ClassName MSFT_xWebBindingInformation -Namespace root/microsoft/Windows/DesiredStateConfiguration -Property @{\r\n        Protocol              = 'http'\r\n        IPAddress             = '*'\r\n        Port                  = 80\r\n        HostName              = 'http2.website'\r\n    } -ClientOnly\r\n\r\n    New-CimInstance -ClassName MSFT_xWebBindingInformation -Namespace root/microsoft/Windows/DesiredStateConfiguration -Property @{\r\n        Protocol              = 'https'\r\n        IPAddress             = '*'\r\n        Port                  = 443\r\n        CertificateThumbprint = 'ACFF44F061DBB4E6D75367BFDD773EFA71431E40'\r\n        CertificateStoreName  = 'MY'\r\n        SslFlags              = 1\r\n    } -ClientOnly\r\n)\r\n\r\nUpdate-WebsiteBinding -Name Website -BindingInfo $BindingInfo\r\n```\r\n\r\nRunning under DSC gives this error btw\r\n\r\n```\r\nPowerShell DSC resource MSFT_xWebsite  failed to execute Set-TargetResource functionality with error message: Failure to add certificate to \r\nweb binding. Please make sure that the certificate thumbprint \"ACFF44F061DBB4E6D75367BFDD773EFA71431E40\" is valid. Error: \"Value does not \r\nfall within the expected range.\". \r\n```\r\n\r\nIs this as intended ?\r\n\r\nAlso I've noticed that the test seems to now always return false\r\n\r\n```\r\nStart-DscConfiguration -Path .\\MSFT_xWebsite_Present_Started -Wait -Verbose -Force\r\n\r\n\r\n    Directory: C:\\Users\\Administrator\\Desktop\\Test\\xWebAdministration\\Tests\\Integration\\MSFT_xWebsite_Present_Started\r\n\r\n\r\nMode                LastWriteTime         Length Name                                                                                        \r\n----                -------------         ------ ----                                                                                        \r\n-a----       21/05/2016   5:10 PM           4598 LocalHost.mof                                                                               \r\nVERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalCon\r\nfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.\r\nVERBOSE: An LCM method call arrived from computer WIN-2C83L4GVAHA with user sid S-1-5-21-3112178870-4162049882-948888378-500.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ Start  Set      ]\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ Start  Resource ]  [[xWebsite]Website]\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ Start  Test     ]  [[xWebsite]Website]\r\nVERBOSE: [WIN-2C83L4GVAHA]:                            [[xWebsite]Website] Bindings for website \"Website\" do not match the desired state.\r\nVERBOSE: [WIN-2C83L4GVAHA]:                            [[xWebsite]Website] The target resource is not in the desired state.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Test     ]  [[xWebsite]Website]  in 0.4530 seconds.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ Start  Set      ]  [[xWebsite]Website]\r\nVERBOSE: [WIN-2C83L4GVAHA]:                            [[xWebsite]Website] Bindings for website \"Website\" have been updated.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Set      ]  [[xWebsite]Website]  in 4.4900 seconds.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Resource ]  [[xWebsite]Website]\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Set      ]\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Set      ]    in  5.3330 seconds.\r\nVERBOSE: Operation 'Invoke CimMethod' complete.\r\nVERBOSE: Time taken for configuration job to complete is 5.407 seconds\r\n\r\n...\r\n\r\nStart-DscConfiguration -Path .\\MSFT_xWebsite_Present_Started -Wait -Verbose -Force\r\n\r\n\r\n    Directory: C:\\Users\\Administrator\\Desktop\\Test\\xWebAdministration\\Tests\\Integration\\MSFT_xWebsite_Present_Started\r\n\r\n\r\nMode                LastWriteTime         Length Name                                                                                        \r\n----                -------------         ------ ----                                                                                        \r\n-a----       21/05/2016   5:10 PM           4598 LocalHost.mof                                                                               \r\nVERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalCon\r\nfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.\r\nVERBOSE: An LCM method call arrived from computer WIN-2C83L4GVAHA with user sid S-1-5-21-3112178870-4162049882-948888378-500.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ Start  Set      ]\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ Start  Resource ]  [[xWebsite]Website]\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ Start  Test     ]  [[xWebsite]Website]\r\nVERBOSE: [WIN-2C83L4GVAHA]:                            [[xWebsite]Website] Bindings for website \"Website\" do not match the desired state.\r\nVERBOSE: [WIN-2C83L4GVAHA]:                            [[xWebsite]Website] The target resource is not in the desired state.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Test     ]  [[xWebsite]Website]  in 0.1250 seconds.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ Start  Set      ]  [[xWebsite]Website]\r\nVERBOSE: [WIN-2C83L4GVAHA]:                            [[xWebsite]Website] Bindings for website \"Website\" have been updated.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Set      ]  [[xWebsite]Website]  in 4.3670 seconds.\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Resource ]  [[xWebsite]Website]\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Set      ]\r\nVERBOSE: [WIN-2C83L4GVAHA]: LCM:  [ End    Set      ]    in  4.6490 seconds.\r\nVERBOSE: Operation 'Invoke CimMethod' complete.\r\nVERBOSE: Time taken for configuration job to complete is 4.668 seconds\r\n```\r\n\r\nIt is a simple config:\r\n\r\n```\r\n            BindingInfo = @(MSFT_xWebBindingInformation\r\n                {\r\n                    Protocol              = 'http'\r\n                    Port                  = '80'\r\n                    IPAddress             = '*'\r\n                    Hostname              = 'http1.website'\r\n                };\r\n                MSFT_xWebBindingInformation\r\n                {\r\n                    Protocol              = 'http'\r\n                    Port                  = '80'\r\n                    IPAddress             = '*'\r\n                    Hostname              = http2.website'\r\n                };\r\n                MSFT_xWebBindingInformation\r\n                {\r\n                    Protocol              = 'https'\r\n                    IPAddress             = '*'\r\n                    Port                  = 443\r\n                    HostName              = 'https.website'\r\n                    CertificateThumbprint = 'ACFF44F061DBB4E6D75367BFDD773EFA71431E40'\r\n                    CertificateStoreName  = 'MY'\r\n                    SslFlags              = 1\r\n            })\r\n```\r\n\r\ncheers\r\n"}}
{"actor":{"display_login":"nzspambot"}}