Updating this with a workaround as well as a fix.
To workaround the issue, you can configure the CC.NET service to run
as the same VSTS user and it will then succeed.
The fix is also very straightforward. This TF call is being generated
inside CheckProjectProcessInfo() in the Vsts.cs file. This method does
not do anything to try to append the login information (this is as of
the CTP build 1.5.0.6237). So, copying this same logic from the
NewHistoryProcessInfo() method in the same file the code below fixes
the problem. Add it just before the return call. The code below also
addresses a logic issue in the original NewHistoryProcessInfo() method
that would repeatedly prepend the domain to the username since this
was being saved as a global variable. This would cause the first call
to succeed but subsequent calls to fail since they would be in the
format of "DOMAIN\DOMAIN\user". For revision 1.5.0.6237 this code goes
in at line Vsts.cs:367.
if (!string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty
(Password))
{
string FQUsername = Username;
if (!string.IsNullOrEmpty(Domain))
{
FQUsername = Domain + @"\" + Username;
}
buffer.AppendArgument(String.Format("-login:{0},{1}",
FQUsername,
ProcessArgumentBuilder.HideArgument(Password)));
}
Gimpster wrote:
> I was previously using CCNET 1.4.4.83 with the TFS 2008 plug-in
> (http://tfsccnetplugin.codeplex.com). This has been working fine
> however since 1.5 is supposed to have native support for VSTS I wanted
> to ditch the plug-in when upgrading. However now I'm having trouble
> connecting. I haven't changed my ccnet.config since updating to 1.5. I
> don't know if I need to because I can't find any documentation that
> talks about the built-in VSTS usage instead of the plug-in. Here is
> the output from my ccnet.log:
>
>
>
> 2009-10-13 21:59:33,332 [Dashboard:DEBUG] Checking if Project $/
> <project> exists
> 2009-10-13 21:59:33,332 [Dashboard:DEBUG] Starting process [c:
> \Program Files\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe] in
> working directory [C:\Sources] with arguments [dir /folders /
> server:<vsts_server> "$/<project>"]
> 2009-10-13 21:59:45,266 [9:DEBUG] [<project> c:\Program Files
> \Microsoft Visual Studio 9.0\Common7\IDE\TF.exe] TF30063: You are not
> authorized to access <vsts_server>.
> 2009-10-13 21:59:45,266 [Dashboard:ERROR] TF30063: You are not
> authorized to access <vsts_server>.
>
> 2009-10-13 21:59:45,266 [Dashboard:WARN] Source control failure
> (GetModifications): TF30063: You are not authorized to access
> <vsts_server>.
>
>
>
> Below is the relevant section from my ccnet.config file:
>
>
>
> <sourcecontrol type="vsts" autoGetSource="true"
> applyLabel="false">
> <server>vsts_server</server>
> <username>user</username>
> <password>pass</password>
> <domain>domain</domain>
> <project>$/project</project>
> <workingDirectory>C:\SourcesworkingDirectory>
> <cleanCopy>true</cleanCopy>
> <workspace>CCNET</workspace>
> <deleteWorkspace>false</deleteWorkspace>
> </sourcecontrol>
>
>
>
> I've tested the command listed in the log file from two different cmd
> prompts windows: the first cmd prompt being run under the "local
> system" account, which is what the CCNET service runs under and the
> other cmd prompt being run under the credentials specified in the
> ccnet.config. When run under "local system" the command fails with the
> same error, but when run under the proper user credentials the command
> succeeds, just as it does under CCNET 1.4.4. This leads me to believe
> that the credentials are either not being read in correctly from the
> config file or they are not being respected. I'm not sure which and I
> need help from someone more familiar with this issue.