On Sun, Jan 15, 2012 at 06:18, xiaobofei <xiaobofei_at_163.com> wrote:
> Hi,
>
> I am trying to run a SVN(Subversion)command line tool from an ASP.NET
> application.
>
> The command is "svn log d:\prog\prog.name". It works fine from command line.
> When i run it using System.Diagnostics.Process.Start(), it is not returning
> the data, instead if i read the standard error output, it is giving the
> following message.
>
> svn: Can't determine the user's config path
>
> Here's the code i am using:
>
> Dim pro As New Process
> pro.StartInfo.FileName = "C:\Program Files\TortoiseSVN\bin\svn.exe"
> pro.StartInfo.Arguments =" log d:\prog\prog.name"
> pro.StartInfo.CreateNoWindow = True
> pro.StartInfo.UseShellExecute = False
> pro.StartInfo.RedirectStandardOutput = True
> pro.StartInfo.RedirectStandardError = True
> pro.StartInfo.RedirectStandardInput = True
> Try
> pro.Start()
> Catch ex As Exception
> Response.Write(ex.Message)
> End Try
> tmpstr = pro.StandardOutput.ReadToEnd.ToString
> tmpstr = pro.StandardError.ReadToEnd.ToString
>
> it worked in xp os;
> no i work it in the windows 7(server 2008),both failed!
> any clues will be appreciated!
Rather than run executables that aren't meant to be run within ASP.NET
(your problem is that the account that the worker process runs under
has no home directory, and thus no config directory), use the SharpSVN
library in your code. It's the correct tool for the job.
http://sharpsvn.open.collab.net/
If you insist upon continuing to do it the wrong way, you will need to
pass the --config-dir parameter to svn.exe, with a valid path to a
directory containing Subversion configuration files.
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2908999
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-01-16 02:42:38 CET