Page 1 of 1

Unhandle exception occured when running the .Net Application

Posted: Wed Jun 19, 2013 9:02 am
by Linna
Hi,
It will pop up "Microsoft .Net Framework" which is presentation of "Unhandle exception has occured in your application……Value cannot be null,parameter name:value" occured When i record the .Net Application.After i select run a application and click Start button on the Record Settings ,the preceding error dialog pop up immediately. I don't know how to solve. the ranorex version is 4.0.3

Re: Unhandle exception occured when running the .Net Application

Posted: Thu Jun 20, 2013 4:10 pm
by Support Team
Hello,

Thank you for the project and the snapshot files.
Unfortunately I am not able to reproduce the issue because I do not have your Application under test.
It seems to be an unhandled exception, which is thrown in your application.
Which version of the .NET Framework are you using?
Could you please check which message is shown if you open the details in the exception dialog.
Additionally could you please ask the responsible developer in your company if this is an exception in your application.
Thank you!

Regards,
Bernhard

Re: Unhandle exception occured when running the .Net Application

Posted: Sat Jun 22, 2013 2:57 pm
by Linna
Hi Bernhard,

Thanks for your reply.The version of .Net Framework is 4.0.This issue isn't related to my Application under test because i directly open my Application under test that will not produce the issue.But I try it by two methods that will produce the issue in Ranorex Studio. One method is setting the work directory of my AUT in Recoder Settings.Another method is writing code in UserCode eg.Host.Local.RunApplication(@"D://ERP//ERP-1.10test//HKMain.exe");





Regards
Linna

Re: Unhandle exception occured when running the .Net Application

Posted: Tue Jun 25, 2013 1:07 pm
by Support Team
Hi Linna,

Could you check if it would work if you set the working directory and the arguments (if needed) to the application specific values?
Host.Local.RunApplication("D:\\ERP\\ERP-1.10test\\HKMain.exe", "arguments", "workingDirectory", false);
Please use the following methode: RunApplication Method (fileName, arguments, workingDirectory, maximized).

Regards,
Markus

Re: Unhandle exception occured when running the .Net Application

Posted: Wed Jun 26, 2013 1:46 pm
by Linna
Hi Markus,

Thank you, I use the code as you recommended but there is still this issue.Due to my file is too big,I will send E-mail to [email protected] .




Regards
Linna