summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWouter Tinus <wouter.tinus@gmail.com>2020-06-02 22:50:30 +0200
committerWouter Tinus <wouter.tinus@gmail.com>2020-06-02 22:50:30 +0200
commit82ab7deca94aa33718d6c6927e188cfe28f96a04 (patch)
tree644a61937e8fc895382c4bc4a0ae6faed24ed273 /src
parent0caa6344261bf85efad3a8a12e63144a71b08bfd (diff)
downloadletsencrypt-win-simple-82ab7deca94aa33718d6c6927e188cfe28f96a04.zip
letsencrypt-win-simple-82ab7deca94aa33718d6c6927e188cfe28f96a04.tar.gz
letsencrypt-win-simple-82ab7deca94aa33718d6c6927e188cfe28f96a04.tar.bz2
prevent Microsoft.Web.Administration to run a "AddModifyBindingTransaction" for a new binding. By switching the order of property assignment (based on ILSpy analyses). Now we should only get the "AddNewBindingTransaction"
Diffstat (limited to 'src')
-rw-r--r--src/main.lib/Clients/IIS/IISClient.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.lib/Clients/IIS/IISClient.cs b/src/main.lib/Clients/IIS/IISClient.cs
index a0b82ee..6830086 100644
--- a/src/main.lib/Clients/IIS/IISClient.cs
+++ b/src/main.lib/Clients/IIS/IISClient.cs
@@ -201,10 +201,10 @@ namespace PKISharp.WACS.Clients.IIS
public void AddBinding(IISSiteWrapper site, BindingOptions options)
{
var newBinding = site.Site.Bindings.CreateElement("binding");
- newBinding.Protocol = "https";
newBinding.BindingInformation = options.Binding;
newBinding.CertificateStoreName = options.Store;
newBinding.CertificateHash = options.Thumbprint;
+ newBinding.Protocol = "https";
if (options.Flags > 0)
{
newBinding.SetAttributeValue("sslFlags", options.Flags);
@@ -223,10 +223,10 @@ namespace PKISharp.WACS.Clients.IIS
"certificateHash"
};
var replacement = site.Site.Bindings.CreateElement("binding");
- replacement.Protocol = existingBinding.Protocol;
replacement.BindingInformation = existingBinding.BindingInformation;
replacement.CertificateStoreName = options.Store;
replacement.CertificateHash = options.Thumbprint;
+ replacement.Protocol = existingBinding.Protocol;
foreach (var attr in existingBinding.Binding.Attributes)
{
try