Can't run application in debug folder of Visua

2019-08-19 02:47发布

I can not run the application in Debug folder without admin rights.Whenever I run it without admin rights, the JIT-debugger window appears. What's the problem? Help me please I need a quick solution.

Update:

Here is the debugger

debugger

after pressing yes

alt text.

Here I can see that can't read path from settings, but when I run it as admin it doesn't give me any exception. Maybe it can't read because there some stuck with file permissions.

The message indicates "Object reference not set to an instance of the object.. " In fact, I expect that person programmed in Visual Studio should be familiar of such kind exceptions.

3条回答
2楼-- · 2019-08-19 03:16

After a long search found a bug, it turned out that the code specified on picture does not work, but after its replacement by:

     private static readonly Configuration Other = ConfigurationManager.OpenExeConfiguration ("MediaPlayer.exe");
     private static readonly string _plPath = Other.AppSettings.Settings ["PlaylistLocation"]. Value;
     private static readonly string _videoDir = Other.AppSettings.Settings ["VideoDestination"]. Value;

all work fine. Let it be a help for those who has faced such a problem.

查看更多
Root(大扎)
3楼-- · 2019-08-19 03:19

Click Yes. It is trying to be helpful and show you what unhandled exception is bombing your program. Whether that will provide a quick solution is unguessable.

查看更多
Emotional °昔
4楼-- · 2019-08-19 03:26

The exception tells me that you don't have that key / value in your .config, and that's why you're getting an exception. Also, the JIT seems to be enabled only to the administrator, and if you run your application without those rights, it will not pop up, but your exception will still be there.

查看更多
登录 后发表回答