Web Connection
IIS installation
Gravatar is a globally recognized avatar based on your email address. IIS installation
  Kuzma Karbachinskiy
  All
  Apr 17, 2019 @ 09:29am

Hi Rick,

It is web connect 6.20. I have long lasted COM start up problem like 'Invalid Com Server ProgId'. I put code in Server functions OnInit, OnInitComplited, onLoad to get errors in wcTraceLog.txt and check in wcErrors.txt for errors from Net Handler 6.20. So far there are no application code errors. In this case I started to make new server windows 2012 R2 to make installation by your recommendations and avoid 'System problems'. I log machine as administrator, run scripts 'Set-ExecutionPolicy Bypass -Scope Process', 'Install-IIS-Features.psl' in 'Administrator Windows PowerShell'

It gave the errors.

Enable-WindowsOptionalFeature : One or several parent features are disabled so current feature can not be enabled.
At D:\wcconnect\Install-IIS-Features.ps1:13 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility45
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

Enable-WindowsOptionalFeature : One or several parent features are disabled so current feature can not be enabled.
At D:\wcconnect\Install-IIS-Features.ps1:32 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASPNET
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

Enable-WindowsOptionalFeature : One or several parent features are disabled so current feature can not be enabled.
At D:\wcconnect\Install-IIS-Features.ps1:33 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASPNET45
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand 

2 features were added manually with Server Manager add rolls and features wizard. There are Net Extensibility 4.5, and ASP.NET 4.5.

What is IIS-ASPNET at line 32? The wizard has features: ASP.NET 3.5, or ASP. There is no feature ASP.NET. I found this feature in list IIS available features and try to install it again. It wasn't installed with the same error message. How to install it?

Thank you, Kuzma Karbachinskiy KKarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: IIS installation
  Rick Strahl
  Kuzma Karbachinskiy
  Apr 17, 2019 @ 03:05pm

What version of Windows Server? This script will only work with Server 2008 R2 and later.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IIS installation
  Kuzma Karbachinskiy
  Rick Strahl
  Apr 18, 2019 @ 06:24am

Hi Rick,

Windows server version is 2012 R2. The error said: 'One or several parent features are disabled so current feature can not be enabled.' Is it critical to have it enabled? If it is could you advice about 'One or several parent features' that have to be enabled before. Please see IIS_available_features list.

Feature Name : IIS-WebServerRole
State        : Enabled

Feature Name : IIS-WebServer
State        : Enabled

Feature Name : IIS-CommonHttpFeatures
State        : Enabled

Feature Name : IIS-Security
State        : Enabled

Feature Name : IIS-RequestFiltering
State        : Enabled

Feature Name : IIS-StaticContent
State        : Enabled

Feature Name : IIS-DefaultDocument
State        : Enabled

Feature Name : IIS-DirectoryBrowsing
State        : Enabled

Feature Name : IIS-HttpErrors
State        : Enabled

Feature Name : IIS-HttpRedirect
State        : Enabled

Feature Name : IIS-WebDAV
State        : Disabled

Feature Name : IIS-ApplicationDevelopment
State        : Enabled

Feature Name : IIS-WebSockets
State        : Enabled

Feature Name : IIS-ApplicationInit
State        : Enabled

Feature Name : IIS-NetFxExtensibility
State        : Disabled

Feature Name : IIS-NetFxExtensibility45
State        : Enabled

Feature Name : IIS-ISAPIExtensions
State        : Enabled

Feature Name : IIS-ISAPIFilter
State        : Enabled

Feature Name : IIS-ASPNET
State        : Disabled

Feature Name : IIS-ASPNET45
State        : Enabled

Thank you for replay.

Kuzma Karbachinskiy KKarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: IIS installation
  Rick Strahl
  Kuzma Karbachinskiy
  Apr 18, 2019 @ 12:54pm

I'm guessing it's the .NET roles that are not installing properly. They need to be installed in the right order - if you have an older script I believe there was a problem with that order.

This is what ships currently and I've used this script on many new servers (although 2016 and later):

# This script installs IIS and the features required to
# run Web Connection.
#
# * Make sure you run this script from a Powershel Admin Prompt!
# * Make sure Powershell Execution Policy is bypassed to run these scripts:
# * YOU MAY HAVE TO RUN THIS COMMAND PRIOR TO RUNNING THIS SCRIPT!
Set-ExecutionPolicy Bypass -Scope Process

# To list all Windows Features: dism /online /Get-Features
# Get-WindowsOptionalFeature -Online 
# LIST All IIS FEATURES: 
# Get-WindowsOptionalFeature -Online | where FeatureName -like 'IIS-*'

Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer
Enable-WindowsOptionalFeature -Online -FeatureName IIS-CommonHttpFeatures
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpErrors
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationDevelopment

Enable-WindowsOptionalFeature -online -FeatureName NetFx4Extended-ASPNET45
Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility45

Enable-WindowsOptionalFeature -Online -FeatureName IIS-HealthAndDiagnostics
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpLogging
Enable-WindowsOptionalFeature -Online -FeatureName IIS-LoggingLibraries
Enable-WindowsOptionalFeature -Online -FeatureName IIS-RequestMonitor
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpTracing
Enable-WindowsOptionalFeature -Online -FeatureName IIS-Security
Enable-WindowsOptionalFeature -Online -FeatureName IIS-RequestFiltering
Enable-WindowsOptionalFeature -Online -FeatureName IIS-Performance
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerManagementTools
Enable-WindowsOptionalFeature -Online -FeatureName IIS-IIS6ManagementCompatibility
Enable-WindowsOptionalFeature -Online -FeatureName IIS-Metabase
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ManagementConsole
Enable-WindowsOptionalFeature -Online -FeatureName IIS-BasicAuthentication
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WindowsAuthentication
Enable-WindowsOptionalFeature -Online -FeatureName IIS-StaticContent
Enable-WindowsOptionalFeature -Online -FeatureName IIS-DefaultDocument
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebSockets
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationInit
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ISAPIExtensions
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ISAPIFilter
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpCompressionStatic

Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASPNET45

# If you need classic ASP (not recommended)
#Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASP


# The following optional components require 
# Chocolatey OR Web Platform Installer to install


# Install UrlRewrite Module for Extensionless Urls (optional)
###  & "C:\Program Files\Microsoft\Web Platform Installer\WebpiCmd-x64.exe" /install /Products:UrlRewrite2 /AcceptEULA /SuppressPostFinish
#choco install urlrewrite -y
    
# Install WebDeploy for Deploying to IIS (optional)
### & "C:\Program Files\Microsoft\Web Platform Installer\WebpiCmd-x64.exe" /install /Products:WDeployNoSMO /AcceptEULA /SuppressPostFinish
# choco install webdeploy -y

# Disable Loopback Check on a Server - to get around no local Logins on Windows Server
# New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -Value "1" -PropertyType dword

It's also possible that the name of the .net roles might be slightly different on older versions of server because at the time .NET 4.5 was .NET 4.0. List the IIS features and see what the NetFx and ASPNet feature names are and adjust the script accordingly.

If that's it, please report back - it might be a good idea to provide a second script (or at least comments in the script) that provide for the older versions of Server.

Then again if you are installing a new server - why install an old OS that's going to be end of life that much sooner?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IIS installation
  Kuzma Karbachinskiy
  Kuzma Karbachinskiy
  Apr 18, 2019 @ 02:06pm

Hi Rick,

You were right that old script is different to new one. I checked IIS Installed Features list on the server and verified that all IIS features in new script are enabled in IIS. I asked about IIS-ASPNET feature that is absent in new script. I found you post on https://weblog.west-wind.com/posts/2017/may/25/automating-iis-feature-installation-with-powershell#what-windows-optional-features-are-available

that IIS-ASPNET feature is absent also. Old script missed

Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect

This statement is in new script. The old OS selected by my manger. It is happened 1 year ago. Application is running well. I need just repeat this installation with corrected System. Manager'll be in 1 week later and I'll let him know. I hope I can proceed to next step to install web connect.

Thank you for replay,

Kuzma Karbachinskiy KKarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: IIS installation
  Rick Strahl
  Kuzma Karbachinskiy
  Apr 19, 2019 @ 01:31pm

Like I said in my previous message: I think the feature names have been renamed. The new names have the version number associated wit the .NET features (ie. 45 postfix).

I suppose I should update the Weblog post with latest version.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IIS installation
  Kuzma Karbachinskiy
  Rick Strahl
  Apr 24, 2019 @ 12:02pm

Thank you for replay and explanations.

Kuzma Karbachinskiy kkarbachinskiy@oneworldonestop.com

© 1996-2019