This project has moved and is read-only. For the latest updates, please go here.

Need help with error assigning SSL certs

Mar 19, 2013 at 10:20 PM
Hi, I'm getting the following error when running the installer on Server 2012 with SP2013 patched with March 13 CU. Any ideas?

See details below:

  • Creating web applications...
  • Web app "MySite Host" already provisioned.
  • Assigning certificate to site "https://mysites:443"
  • Looking for existing "mysites" certificate...
  • None found.
  • Creating new self-signed certificate...
  • Certificate "CN=mysites" found.
  • Exporting "CN=mysites" to "mysites.cer"...
  • Importing "mysites.cer" to Local Machine\Root...

- Assigning certificate "CN=mysites" to SSL-enabled site...

  • Script halted!
Exception : System.ComponentModel.Win32Exception (0x80004005): Cannot create a file when that file already
                       at Microsoft.IIs.PowerShell.Framework.HttpApi.CreateSSLBinding(IPEndPoint endPoint, String 
                    hostName, HTTP_SERVICE_CONFIG_SSL_PARAM_MANAGED allSSLData, SslFlags sslFlags)
                       at Microsoft.IIs.PowerShell.Framework.SslBindingFactory.CreateInstance(String name, String 
                    typeName, INamespaceNode parent, Object dynamicParameters, Object newObject, Boolean force, 
                    Boolean recurse, TypeManager tm, CmdletProvider provider)
                       at Microsoft.IIs.PowerShell.Provider.ConfigurationProvider.NewItem(String path, String 
                    itemTypeName, Object newItemValue)
                       at System.Management.Automation.SessionStateInternal.NewItemPrivate(CmdletProvider 
                    providerInstance, String path, String type, Object content, CmdletProviderContext context)
TargetObject :
CategoryInfo : NotSpecified: (:) [New-Item], Win32Exception
FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.NewItemCommand
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at AssignCert, C:\SPInstall\AutoSPInstaller\AutoSPInstallerFunctions.ps1: line 1709
                    at CreateWebApp, C:\SPInstall\AutoSPInstaller\AutoSPInstallerFunctions.ps1: line 1813
                    at CreateWebApplications, C:\SPInstall\AutoSPInstaller\AutoSPInstallerFunctions.ps1: line 1732
                    at Setup-Farm, C:\SPInstall\AutoSPInstaller\AutoSPInstallerMain.ps1: line 159
                    at <ScriptBlock>, C:\SPInstall\AutoSPInstaller\AutoSPInstallerMain.ps1: line 321
                    at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails :
Mar 20, 2013 at 1:06 AM
It will be helpful to see the XML configuration. But are you trying to configure multiple web apps all with port HTTPS and 443 on the same Web Front end?
Mar 20, 2013 at 10:13 AM

I have used the same XML configuration file before on Server 2008 and I had no issues. I am creating two web apps both using https/443 with host headers. I'm running this on one wfe to begin with then do a remote install on a second.
Mar 20, 2013 at 7:11 PM
Make sure you're using the latest changeset, available here: I implemented a fix a little while ago for this.

Mar 20, 2013 at 7:53 PM
Brian, thanks. I feel rather stupid now - I've been using the October build in the download section. I have been using the GUI to configure my files too. Hopefully this will still work. Many thanks.