Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Found projects because of missing trailing slash in azureDevOpsOrganizationUrl #41

Closed
achimismaili opened this issue Aug 23, 2019 · 0 comments

Comments

@achimismaili
Copy link

achimismaili commented Aug 23, 2019

In the ManagedClientConsoleAppSample/README.md, it says:

azureDevOpsOrganizationUrl - update this with the url to your Azure DevOps/TFS collection, e.g. http://dev.azure.com/organization for Azure DevOps.

When I am just updating the organization URL in the mentioned format, I get an unsuccessful NOT FOUND response, when the HttpClient is trying to GetAsync.

The reason is, that the HttpClient.GetAsync combines the BaseAddress with the relative request URI without the Organization name, when there is a slash missing behind the URL of azureDevOpsOrganizationUrl!

This was not possible to happen in the vsts URL before, as the organization name was part of the FQDN at that time, so this problem was introduced by the switch to dev.azure.com.

(Also, the new URI statement around the URL when setting the BaseAddress does unfortunately also not ensure, that there is a trailing slash at the end of the BaseAddress afterwards.)

Suggesting to fix README containing the trailing slash and mention, that it is important. Also, e.g. update Program.cs like:

internal const string azureDevOpsOrganizationName = "organization"; //change to the (URL-)name of your Azure DevOps organization;
internal static string azureDevOpsOrganizationUrl = $"https://dev.azure.com/{azureDevOpsOrganizationName}/"; // NOTE: This must use HTTPS and trailing slash is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants