Execute batch file from network

3 posts, 1 answers
  1. Adriane
    Adriane avatar
    28 posts
    Member since:
    Apr 2012

    Posted 30 Apr 2012 Link to this post


    I want to execute a batch file (from network) in a Code Scripted Step like this:

    Process prc = new Process();

                prc.StartInfo.FileName = @"W:\QA\copyTestFileToFolder.bat";

                prc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;




    I got the following message:
    '30.04.2012 15:44:12' - System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.   at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)   at System.Reflection.Assembly.LoadFile(String path)   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureAssemblyExists(String assembly, String folder)   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder)   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)

    We need to run the tests under cruise Control and automatic. So we need the code to be on the network share.
    What do I have to do, to give the access?


  2. Answer
    Anthony avatar
    19 posts

    Posted 30 Apr 2012 Link to this post

    Hello Adriane,

    See here for our troubleshooting guide article on that error.

    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Adriane
    Adriane avatar
    28 posts
    Member since:
    Apr 2012

    Posted 02 May 2012 Link to this post

    Thanks, that helps :)
Back to Top