13 Comments

  1. Ravi Saini

    Hi Able,

    Thanks for wonderful blog. I facing following error when uploading your code to VSTS.

    Unhandled Exception: System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthor
    ized).
    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
    at CreateDevOpsDemo.Program.d__18.MoveNext() in C:\Users\abel\Source\MicrosoftStuff\CreateDevOpsDemo\Crea
    teDevOpsDemo\Program.cs:line 399

    • abel

      VSTS has changed a bit since I first wrote this article. You will need to use a Personal Access Token (PAT) when you run the script to create work items. I have updated the blog to reflect this.

  2. Priya

    Hi,
    I’m trying to add the workitems to my VSTS account but it shows an error “Unhandled Exception: System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).” I’m following your article each and evary step please help me solve the error.

    Thanks,
    Priya.

    • abel

      Try using a Personal Access Token instead of a username and password. I have updated my blog to reflect this.

  3. Jdmveira

    Hi,

    First of all, thanks for this article. I am finding some issues while trying to launch CreateDevOpsDemo program on the Program.cs line 402

    .\CreateDevOpsDemo.bat /collection:https://{my_visualstudio_url}/DefaultCollection /p:MercuryHealth /user:{my_user} /password:{my_password}

    Unhandled Exception: System.ArgumentException: Invalid JSON primitive: .

    Have you published the code for this tool, so I can check what could be happening? Or can you help me with this issue?

    Kind regards.

    • abel

      Hi, a couple of things. Make sure you are using a Scrum template. Right now the code only supports using the Scrum template. Also, instead of using a username and password, use a Personal Access Token. I have updated my blog post to reflect this.

    • abel

      Hi Steve, I was having some issues with my blog and wasn’t getting alerts when people posted comments! What process template are you using? right now the code only supports Scrum template and not Agile or CMMI. If there is a demand, I can update the code to support all of the out of the box templates.

    • abel

      Also, make sure you use a personal access token instead of a user name and password pair. That is no longer supported in VSTS. I have updated my blog post to reflect this. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *