Permission issue with app.config?

Ask general questions here.
c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Permission issue with app.config?

Post by c676228 » Thu Sep 01, 2016 7:39 pm

Hi Folks,

I have tried to run the deployed test suite with two different user logins to the computer, both have admin right to the computer. One is successful, however when one userid runs the same test case, an exception throw with message like this:
"project folder is not set in app.config"

What is the issue?

Best Regards,
Betty

User avatar
RobinHood42
Posts: 239
Joined: Fri Jan 09, 2015 3:24 pm

Re: Permission issue with app.config?

Post by RobinHood42 » Fri Sep 02, 2016 11:42 am

Hi Betty,

I'm afraid that we would need further information.

Did you manually modify the "app.config" file?
Where did you store the test executable/project?
How are you executing the test executable, e.g. via command line, Jenkins...

Also, please post the entire error message you receive.

Cheers,
Robin

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Permission issue with app.config?

Post by c676228 » Wed Sep 07, 2016 6:43 pm

Hi Robin,

I am not sure if this has something to do .net framework reference location(my development machine is windows 8 VM, my deployment machine is 2012R2 real machine)caused this runtime issue? In order to see the issue, I installed ranorexstudio on my deployment machine.
When I rebuild the project on the deployment computer, I see the warning. See the attachment.
2016-09-07_compileWarningOn2012R2.png
warning seen on windows 2012R2
2016-09-07_compileWarningOn2012R2.png (78.06 KiB) Viewed 559 times
I noticed that on windows 8, the system.web, system.data and mscorlib.dll are located in
c:\program(x86)\reference assembiles\microsoft\Framework\.NET Framework\v4.5

while on windows 2012R2, those three files are located
c:\windows\microsoft.NET\Framework\v4.0.30319

I have .net framework 4.5 installed on both machines. see the version info in the attachments.
I don't know how these kind reference location differences being handled in build. Should we just use the exact same machine in order to avoid this kind of issue?

Betty
Attachments
2016-09-07_OnWins20212R2.png
2016-09-07_OnWins20212R2.png (22.01 KiB) Viewed 559 times
2016-09-07_OnWin8.png
2016-09-07_OnWin8.png (32.58 KiB) Viewed 559 times

User avatar
RobinHood42
Posts: 239
Joined: Fri Jan 09, 2015 3:24 pm

Re: Permission issue with app.config?

Post by RobinHood42 » Fri Sep 09, 2016 11:42 am

Hi Betty,

May I ask which version of Ranorex you are currently using? I guess this error message was shown with Ranorex 5.X. Am I right?

If you're still using Ranorex 5, which is no longer officially supported. I would recommend updating to Ranorex 6.1, currently the latest version.

Also, it's always worth a try to completely uninstall Ranorex as well as the .NET framework and to perform a re-install afterwards. Please ensure that the .NET framework gets installed before installing Ranorex.

Hope this helps,
Robin

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: Permission issue with app.config?

Post by c676228 » Tue Sep 13, 2016 2:05 am

Hi Robin,

Yes I am using Ranroex 5.4.6. As I am running into more and more bizarre behaviors, I am thinking of upgrade to Ranorex 6.1.

Yes, many times I resolve bizarre behaviors by uninstall and reinstall Ranorex, not necessarily .NET. However, not everything can be solved by this.

I believe the issue I mentioned above is due to the reference of the dll file as well as app.config.

For example, the following statement works fine on dev machine:
string defaultBrowser = System.Configuration.ConfigurationManager.AppSetting["Broswer"];
However, on deployment machine it throws an exception, obviously either reference to the app.config or to
System.Configuration.ConfigurationManager got some issue( I did deploy app.config file on deployment machine).

Best Regards,
Betty