Cannot setup Fiddler as HostServer Proxy on K2 Five 5.3 due to Configuration Service
Issue
Starting K2 Five 5.3, if you are trying to use Fiddler as proxy with K2HostServer to capture server side calls, the K2 Server service won't start and will display an error as below:
"ErrorMessage","SourceCode.Hosting.Server.Runtime.HostLoadBalancedServerManager.Poll","0 System.Exception: Error (401) Unauthorized.
at SourceCode.Configuration.Client.Extensions.RestSharpExtensions.EnsureSuccesseT](IRestResponse`1 response)
at SourceCode.Configuration.Client.ConfigurationClient.GetServices()
at SourceCode.Hosting.Server.Runtime.HostLoadBalancedServerManager.Poll()"
Symptoms
The K2 HostServer fails to start.
Troubleshooting Steps
Workaround
- Export the “Environment Owner” certificate as ClientCertificate.cer (the file must be named as ClientCertificate.cer)
-
-
- No need to export the private key
- Place the ClientCertificate.cer under %USERPROFILE%My DocumentsFiddler2ClientCertificate.cer
- Restart Fiddler
- Start the K2 Server.
-
Cause
K2 Configuration Service uses client certificate authentication and Fiddler does not know which certificate to present to it.