Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleASP.NET Core app fails to start due to CryptographicExceptionNegotiate Authentication handler

Symptoms

When trying to request some data from the Tsplice API, an error message is returned to the client:

HTTP Error 500.30 - ASP.NET Core app failed to start

and the Windows Application event log shows a message like the following:

Code Block
Category: Microsoft.AspNetCore.Hosting.Diagnostics
EventId: 6

Application startup exception

Exception: 
System.InvalidOperationException: The Negotiate Authentication handler cannot be used on a server that directly supports Windows Authentication. Enable Windows Authentication for the server and the Negotiate Authentication handler will defer to it.
   at Microsoft.AspNetCore.Authentication.Negotiate.PostConfigureNegotiateOptions.PostConfigure(String name, NegotiateOptions options)
   at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd[TArg](String name, Func`3 createOptions, TArg factoryArgument)
   at Microsoft.Extensions.Options.OptionsMonitor`1.Get(String name)
   at Microsoft.AspNetCore.Authentication.Negotiate.Internal.NegotiateOptionsValidationStartupFilter.<>c__DisplayClass2_0.<Configure>b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)

Explanation

This error occurs because Windows Authentication is disabled in the web server application’s Authentication settings.

Resolution

Follow the instructions at Installation Requirements to fix the Windows Authentication setting.

Expand
titleNotFound error while downloading application files from host

Symptoms

Texplore fails to connect to a custom application on a host, and displaying the error details shows a very long error message that begins like the following:

image-20240916-165525.pngImage Added

Further down in the error message, it indicates “The request filtering module is configured to deny the file extension”:

image-20240916-165632.pngImage Added

Explanation

By default, Internet Information Services includes a Request Filtering module that prevents the download of certain file types based on their extension, and this typically includes .config files. However, custom applications that utilize Texplore’s automatic download functionality to copy files down to the client system typically include one or more .config files in the \HmiConfig\ folder. When Texplore tries to download these files, IIS returns a 404 NotFound error.

Resolution

Confirm the %TSENTRY_SYSDIR%\tpriNtRt\wwwroot\web.config file includes the tags that clear all file extensions from the request filtering module as shown below:

Code Block
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  ...
  <system.webServer>
    <security>
      <requestFiltering>
         <fileExtensions>
            <clear />
         </fileExtensions>
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>

Alternatively, Request Filtering can be disabled for the website as follows:

  • Click on the Request Filtering module for the target website

    • image-20240916-170737.pngImage Added
  • Right-click on the .config File Extension and choose Remove

    • image-20240916-171005.pngImage Added