This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

When browsing to SmartForms Runtime forms, the theme will not load.  A 500 error will be found in the browser’s console.

Symptoms

When browsing to SmartForms Runtime forms, the theme will not load.  A 500 error will be found in browser’s console.

When enabling SmartForms logging:
<add key="Forms.Global.ErrorLogging.Enabled" value ="true" />
<add key="Forms.Global.ErrorLogging.FilePath" value ="C:\Debug\SourceCode.Forms.Web.error" />

The following errors were found:

Failed to get resource: /Runtime/Styles/Themes/Lithium.css?_v=5.1004.18130.3
Exception:
SourceCode.Forms.AppFramework.AsyncException: Asynchronous operation failed ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at SourceCode.Forms.AppFramework.CombinedResourceUtility.RetrieveRequestComplete(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at SourceCode.Forms.AppFramework.AsyncResult.EndRequest()
   at SourceCode.Forms.AppFramework.CombinedResourceHandler.ProcessRequest(HttpContext context, CacheEntry entry)

InnerException:
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

   at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)   at SourceCode.Forms.AppFramework.CombinedResourceUtility.RetrieveRequestComplete(IAsyncResult ar)

InnerException:
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
URL: /Runtime/CombinedResource.ashx?d=xxx=&c=c&_v=5.1004.18130.3

Troubleshooting Steps

Adding the following Registry Key resolved the issue:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\ SchUseStrongCrypto
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\ SchUseStrongCrypto

Please see following reference for more details: https://support.microsoft.com/en-us/help/4040243/how-to-enable-tls-1-2-for-configuration-manager