Multiple StartInfo Arguments: Win32 Exception Unhandled, Access Denied

If running 10 dynamic library files, it works well.

string targetDir = string.Format(@C:XXXinDebug);
Process test = new Process();
test.StartInfo.FileName = "MSTest.exe";
test.StartInfo.WorkingDirectory = targetDir;
test.StartInfo.Arguments = "/testcontainer:" +
@C:sourceaaa.dll +
" /testcontainer:" + @C:sourcebb.dll +
" /testcontainer:" + @C:sourceccc.dll +
" /testcontainer:" + @C:sourceddd.dll +
" /testcontainer:" + @C:sourceeee.dll +
" /testcontainer:" + @C:sourcefff.dll +
" /testcontainer:" + @C:sourceggg.dll +
" /testcontainer:" + @C:sourcehhh.dll +
" /testcontainer:" + @C:sourceiii.dll +
" /testcontainer:" + @C:sourcejjj.dll +
" /testcontainer:" + @C:sourcekkk.dll +
" /testcontainer:" + @C:sourcelll.dll +
" /testcontainer:" + @C:sourcemmm.dll +
" /testcontainer:" + @C:source
nn.dll" +
" /testcontainer:" + @C:sourceooo.dll +
" /testcontainer:" + @C:sourceppp.dll +
" /runconfig:" + @C:source est1.testrunconfig;
test.Start();
test.WaitForExit();

if running more dll files, there is exception, Win32 Exception Unhandled, Access Denied as shown below:

Error: Access is denied
Source: System
Stack Trace: at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()

Any solutions to solve it ?? Thx.



Comments

  • Without seeing real code or a better stack trace my first impulse is to think that something is locking one or more of your .dlls making it appear as if a certain number of .DLLs is what is causing the problem.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion