Access is denied problem
I have a problem. When i'm trying to run my c# code (with or without debbuging in visual studio 2022 it shows me "Access is denied"... I tried almost everything i can find to fix it but nothing worked please help...
22 Replies
does it say that before even running? or is it actually about a portion of a code where the error occurs?
after running the code and it shows in a console
or if u start debbuging it creates a popup
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, what you expect the result to be, what .NET version you are using and what platform/environment (if any) are relevant to your question. Upload code here https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code! (see $code for more information on how to paste your code)
specifically the code part
You need photo of actual code?
it could defnitely hlep
here you go but i dont think the problem is in code
something denies access to running it or something
ur correct its not the code, but then i cant help you, someone else gotta jump in, have u tried running vs as admin?
ye i tried that
nothing
building and running the exe itself does that work?
like the vs exe?
no no if you right click on the project in vs and rebuild, you can go to the bin folder and locate the exe that was built
just wanna know if you can build in general
Did you download the project?
from the internet
If not, please check if your folder is set to read-only
and if you did, check if the folder is being blocked.
both of which you can do when you right-click your project folder and go into properties
I guess u mean this one
no i wrote it on my own
it is
where does it show exatcly?
If it is then please disable it
the folder should not be read-only
ooh ok
Ok this particular project works but when i try to run the next one it says acces is denied (i unchecked the read only mark), and also when i uncheck read only mark and close the properties and then open them again it gets checked again automatically
if that makes sense
Did you press apply?
sorry, had to go... Ye i pressed apply but it still unchecks automatically