I have a c# app that uses the Octopus.Client library v5.2.0. The app works as expected when run from the command line. However when this app is run as part of a teamcity build the app fails with the error below.
The resource you requested was not found.
at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse) at Octopus.Client.OctopusClient.Get[TResource](String path, Object pathParameters) at Octopus.Client.OctopusClient.EstablishSession() at Octopus.Client.OctopusClient.get_RootDocument() at Octopus.Client.Repositories.CertificateConfigurationRepository.DetermineCollectionLinkName(IOctopusClient client) at Octopus.Client.OctopusRepository..ctor(IOctopusClient client)
This happens when the app first tries to connect to the octopus server.
_octopus = new OctopusRepository(new OctopusServerEndpoint(octoUrl, octoKey));
I can see in the application logs that when the application is started as part of a teamcity build the logger Octopus.Client.AutomationEnvironments.AutomationEnvironmentProvider logs this:
Detected automation environment: TeamCity/2017.1.1
where as when run from the command line it logs
Detected automation environment: NoneOrUnknown