C# app.exe Access Denied

I created a console app.  I'm trying to test it.  When I run it I get "Access is Denied."  Do not know why.  I am an administrator on my personal computer.

Any ideas?
LVL 2
CipherISAsked:
Who is Participating?
 
CipherISAuthor Commented:
I rebooted my computer and it seems to be working.  Weird.  Thanks.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Does it actually start?
What does it attempt to do when it is starting?
Have you tried the 'run as administrator' option from the context menu when you right click on the exe?
0
 
Éric MoreauSenior .Net ConsultantCommented:
you are surely trying to access a resource (network drive or something else) that is not available. On which line of code do you have the error? You will need to trace your application to find out.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
CipherISAuthor Commented:
the EXE is on my C:\ drive under a subdirectory.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Please answer the questions you have been asked.
0
 
CipherISAuthor Commented:
I don't have a line of code.  I am running it from the command line and I am receiving an "access denied".  Right now I'm just writing a simple console app and will expand on it.  Like a Hello World for an example.  I'm testing passing parameters into it.  

Just wanted to write the parameters out before I went further in the code.  When I went to test it I received the "Access Denied" from the command prompt.  I'm glad I found this issue now before I went further with the development.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
>>I don't have a line of code.

So it is basically the following:
Main()
{
}
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
And to repeat myself:

Does it actually start?
What does it attempt to do when it is starting?
Have you tried the 'run as administrator' option from the context menu when you right click on the exe?

The first two seemed to be answered by no and absolutely nothing but what about the third?
0
 
CipherISAuthor Commented:
Does it actually start?
-  No.  Nothing is happening.  

What does it attempt to do when starting?
-  It's a simple code.  I am getting the string[] args and just doing a Console.WriteLine.  That is all at the moment.

Have you tried the 'run as administrator'....
I set the "Run as administrator" after right clicking on the EXE and it's still "Access Denied".

 Error.jpg
0
 
CipherISAuthor Commented:
The one thing I did differently was run vsvars32.bat prior to doing anything.  I wrote a simple Hello World Winform and that won't open from the EXE.  I can run it in .NET but it is not running when I go to the bin directory and double click on the EXE..

I'm using VS 2015.
0
 
CipherISAuthor Commented:
Rebooting seems to have solved the issue.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.