Search code examples
c#asp.netwcfazure-devops

Errors creating projects in tfs2018 using VSTS commands through an application deployed in IIS on windows server 2008r2


This is the an example of a command that i used: login --token XXXXXXXXXXXXXXXXXXXXXXX --instance http://xx.xx.xx.xx/XX_Collection/ This is the error that appears: Result: ERROR: (1312, 'CredWrite', 'A specified logon session does not exist. It may already have been terminated.')

With other differents commands the result is the same.

In local machine with Visual Studio 2015 works without problems, also using the same commands directly with cmd.exe in server works perfectly, but with the application that we deployed on the server results the error that i said before.

¿Someone can have any idea about this problem, maybe it's necessary any specific feature to execute cmd.exe through an application deployed in IIS? Thanks.


Solution

  • This behavior maybe caused by the "Do not allow storage of credentials or .NET Passports for network authentication" Network access policy enabled. You may try the workaround below:

    1. On the Management Server, click Start, click Run, type gpedit.msc, and then click OK.
    2. Under Computer Configuration, expand Windows Settings, expand Security Settings, expand Local Policies, and then expand Security Options.
    3. In the Policy pane, right-click Network access: Do not allow storage of credentials or .NET Passports for network authentication, click Properties, click Disabled, and then click OK.

    Check this case for more details:

    https://blogs.technet.microsoft.com/askperf/2012/04/18/task-scheduler-error-a-specified-logon-session-does-not-exist/