Home

  
 
 

Search Knowledge Base


Knowledge Base Web View
Total Records: 105
ID Title Type Of Article
5723 
How to enable TLS1.2 for .net framework on IIS Web Server Support
2339 
Business Give me a list of inexpensive ideas to promote my business of IT Security. Support
1457 
Firewall Lost Connection between network or internet Support
1439 
Engage SQL Errors and find a stuck user session means RDP Server needs to be rebooted How To
1404 
Setup Engage BMS Launch Batch File for Engage Startup How To
1381 
Work Order Task Details Updates to Main Work Order How To
1374 
Engage Corrupt Application Run Directory SCVersion10 Error Missing Variable Input Support
1323 
Sophos MDR Managed Detection and Response Sales Collateral
1317 
Reenabling Home Page or Web Page Views for Outlook Folders How To
1312 
Case Studies and Success Stories Sales Collateral
1228 
Customer Care Vendor Management & Billing Protocol SOP
1177 
MS365 Updates March 2022 Document
1171 
Check Junk Folder and Quarantine Email on Office 365 to find missing emails How To
1158 
Enable IE Compatibility Mode in Windows Edge Browser How To
1155 
Change your Microsoft 365 for business password to keep your account secure How To
1145 
Export Gmail and Import into Outlook How To
1144 
MS Teams How To Videos Training Resources
1130 
How to create a Fillable PDF from Engage Check List How To
1108 
Microsoft Office Cheat Sheets Training Resources
1107 
Excel Training Tips and Tricks Training Resources
1106 
Outlook Training Tips and Tricks Training Resources
1105 
Word for Windows Training Tips and Tricks Training Resources
1065 
Email DMARC stands for Domain-based Message Authentication, Reporting and Conformance Support
1056 
How to backup and restore Taskbar Pinned Apps How To
1037 
Engage Startup Settings will Crash if not setup correctly Support
Add New  Records per page  1 of 5   
Engage Knowledge Base Web View         Support          Print
Title How to enable TLS1.2 for .net framework on IIS Web Server      
Resolution

Issue: .NET application pool attempts to establish an SSL/TLS connection to a third-party service or API and encounters errors.

Possible Errors:

  • The client and server cannot communicate, because they do not possess a common algorithm.
  • Could not create SSL/TLS Secure Channel.

Resolution: To resolve the above issues, follow these steps:

  • Copy the script text and save as enabletls12.ps1 and testtls.ps1 on the web server, example directory C:\support.
  • Run the scripts from elevated powershell on the IIS server where the .NET application pool is hosted.
    • Example: cd c:\support
    • .\enabletls12.ps1
    • .\testtls.ps1
  • Your test output should look like the following screenshot.
  • Test your web application again to see if the errors are resolved.EnableTLS12.ps1
Enabletls12.ps1

If (-Not (Test-Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319'))
{
    New-Item 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319' -Force | Out-Null
}
New-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319' -Name 'SystemDefaultTlsVersions' -Value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -PropertyType 'DWord' -Force | Out-Null

If (-Not (Test-Path 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319'))
{
    New-Item 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319' -Force | Out-Null
}
New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319' -Name 'SystemDefaultTlsVersions' -Value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -PropertyType 'DWord' -Force | Out-Null

If (-Not (Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server'))
{
    New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -Force | Out-Null
}
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -Name 'Enabled' -Value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -Name 'DisabledByDefault' -Value '0' -PropertyType 'DWord' -Force | Out-Null

If (-Not (Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client'))
{
    New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -Force | Out-Null
}
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -Name 'Enabled' -Value '1' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -Name 'DisabledByDefault' -Value '0' -PropertyType 'DWord' -Force | Out-Null

Write-Host 'TLS 1.2 has been enabled. You must restart the Windows Server for the changes to take affect.' -ForegroundColor Cyan

testtls.ps1

Function Get-ADSyncToolsTls12RegValue
{
    [CmdletBinding()]
    Param
    (
        # Registry Path
        [Parameter(Mandatory=$true,
                   Position=0)]
        [string]
        $RegPath,

# Registry Name
        [Parameter(Mandatory=$true,
                   Position=1)]
        [string]
        $RegName
    )
    $regItem = Get-ItemProperty -Path $RegPath -Name $RegName -ErrorAction Ignore
    $output = "" | select Path,Name,Value
    $output.Path = $RegPath
    $output.Name = $RegName

If ($regItem -eq $null)
    {
        $output.Value = "Not Found"
    }
    Else
    {
        $output.Value = $regItem.$RegName
    }
    $output
}

$regSettings = @()
$regKey = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319'
$regSettings += Get-ADSyncToolsTls12RegValue $regKey 'SystemDefaultTlsVersions'
$regSettings += Get-ADSyncToolsTls12RegValue $regKey 'SchUseStrongCrypto'

$regKey = 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319'
$regSettings += Get-ADSyncToolsTls12RegValue $regKey 'SystemDefaultTlsVersions'
$regSettings += Get-ADSyncToolsTls12RegValue $regKey 'SchUseStrongCrypto'

$regKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server'
$regSettings += Get-ADSyncToolsTls12RegValue $regKey 'Enabled'
$regSettings += Get-ADSyncToolsTls12RegValue $regKey 'DisabledByDefault'

$regKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client'
$regSettings += Get-ADSyncToolsTls12RegValue $regKey 'Enabled'
$regSettings += Get-ADSyncToolsTls12RegValue $regKey 'DisabledByDefault'

$regSettings

 

Vendor
Web Link
Date Entered 6/11/2024
You Tube Link
Type Of Article Support
Article ID 5723


  Copyright    Lietz Development, Inc. 1996. All Rights Reserved.