Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

C# app.exe Access Denied

Posted on 2016-09-03
11
Medium Priority
?
75 Views
Last Modified: 2016-09-09
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?
0
Comment
Question by:CipherIS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41783405
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
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41783621
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
 
LVL 1

Author Comment

by:CipherIS
ID: 41783794
the EXE is on my C:\ drive under a subdirectory.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41783796
Please answer the questions you have been asked.
0
 
LVL 1

Author Comment

by:CipherIS
ID: 41783915
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
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41783926
>>I don't have a line of code.

So it is basically the following:
Main()
{
}
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41783927
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
 
LVL 1

Author Comment

by:CipherIS
ID: 41783932
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
 
LVL 1

Author Comment

by:CipherIS
ID: 41784057
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
 
LVL 1

Accepted Solution

by:
CipherIS earned 0 total points
ID: 41784117
I rebooted my computer and it seems to be working.  Weird.  Thanks.
0
 
LVL 1

Author Closing Comment

by:CipherIS
ID: 41791023
Rebooting seems to have solved the issue.
0

Featured Post

Python: Series & Data Frames With Pandas

Learn the basics of Python’s pandas library of series & data frames and how we can use these tools for data manipulation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question