I have a little utility application that runs some Subversion commands for different scenarios (basically just to make a couple standard activities I do a bit easier).
In that application I use System.Diagnostics.Process to run a set of svn commands (the one in question is an update command). When running this though I get back an svn E175013 unable to connect to a rpository at URL '[url]' and Access to '[repository]' forbidden. (I'm getting that in the process.StandardError message back) Seems straight forward enough, but when I run the same command from a command line it succeeds without error and runs the update.
The command being run is:
svn update "[directory]" --non-interactive --trust-server-cert --username [username] --password [password] --config-dir [subversionDirectory]
The code to create the same process (ProcessStartInfo) is:
process.StartInfo = new ProcessStartInfo
{
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
FileName = executableLocation,
WindowStyle = ProcessWindowStyle.Hidden,
Arguments = commandParameters
};
The code side is in a web service that is using impersonation for the same user that is in the [username] in the command; the cmd side I've done a runas to run as the same user that is in the [username] in the command.
It should also be noted that when the command is "status" instead of "update" that it seems to work on both, however the update works in CMD but fails on the code side.
What would make one process succeed while the other fails (this is consistent, from cmd it always works and from process in code it always fails)? I'm at a bit of a loss as to what to look at next to resolve this issue.