Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

System Unauthorized Access

Discussion in 'Editor & General Support' started by KlausKlaudius, Sep 30, 2015.

  1. KlausKlaudius

    KlausKlaudius

    Joined:
    Jul 22, 2015
    Posts:
    8
    I use Windows 8 in my computer (yes, I know, using Windows is the most terrible sin for a programmer; but you know, I'm just a rookie!), and when I'm working with Unity editor, sometimes appers this error message:

    <<
    Unhandled Exception: System.UnauthorizedAccessException: Access to the path "C:\Users\Public\Documents\Unity Projects\probadura2\Temp\Assembly-CSharp.dll.mdb" is denied.
    >>

    The problem is that the message is becoming more frecuent, and forces me to exit and restart Unity again, because the play mode won't start unless all errors are solved.

    What can I do (appart of changing my OS)?
     
  2. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    Quick question: Are you running Unity as administrator?? :)
     
  3. 230000751

    230000751

    Joined:
    Jul 30, 2015
    Posts:
    12
    I have had the same problem for quite a while. Part of the problem may also be a firewall preventing Unity from accessing certain points. Running as Administrator didn't do a thing for me.
     
    holliebuckets likes this.
  4. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    This post from a bit ago may help. http://forum.unity3d.com/threads/in...on-system-unauthorizedaccessexception.133493/
    What kind of antivirus software do you have?? Also, the second post from user vastor is hilarious!!!
     
    230000751 likes this.
  5. KlausKlaudius

    KlausKlaudius

    Joined:
    Jul 22, 2015
    Posts:
    8
    That's it, McAfee is my antivirus, as well! So it must be the problem, not Windows...(by the way, yes, I run Unity as administrator). I'll try to change the firewall configuration to make McAfee leaves Unity alone, firstly. If it doesn't work, then I'll have to re-install the antivirus.

    Thanks a lot for your help, holliebuckets (and 230000751). I'll tell you if I'm able to solve the problem.
     
    holliebuckets likes this.
  6. 230000751

    230000751

    Joined:
    Jul 30, 2015
    Posts:
    12
    Yep, Mcafee is it. I run Viper security on another machine and do not have any problems. As you said, just configuring the firewall settings should take care of this problem. :)
     
  7. f4bo

    f4bo

    Joined:
    Oct 7, 2014
    Posts:
    21
    the solution above does not work for me - I'm on windows 10 (alas!), local user acces (no admin), got Avast antivirus and never had this issue with previous unity3d releases on this same pc setup.
     
    Last edited: Oct 17, 2015
  8. 230000751

    230000751

    Joined:
    Jul 30, 2015
    Posts:
    12
    So have you allowed private and public access for the Unity application in your firewall? If so, that should have fixed it.
     
  9. Brainswitch

    Brainswitch

    Joined:
    Apr 24, 2013
    Posts:
    270
    I frequently got error messages such as these, which seemed to be caused by my antivirus reading the file at the same (turning off/excluding the Unity project path in my antivirus helped). Then I got an SSD when I upgraded to Windows 10 and no more issues. I believe the faster speed of the SSD might have helped, but what might help you is to exclude your Unity project path in your antivirus.
     
  10. f4bo

    f4bo

    Joined:
    Oct 7, 2014
    Posts:
    21
    lol I checked and windows fw grant no access whatsoever to unity editor - anyhow since the previous post I haven't had any other similar error messages but I opened the firewall for the editor anyway, let's see how it goes
     
    230000751 and holliebuckets like this.
  11. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    please keep us posted :D and thank you so much for all the feedback!!
     
  12. f4bo

    f4bo

    Joined:
    Oct 7, 2014
    Posts:
    21
    There you go: have been a while since the last time I've seen it and today here it comes again, and on a different unity release (5.2.2.f1) also:
    Anyhow, just closing and reopening Unity was enough to made it disappear and keep on working.
     
  13. Brainswitch

    Brainswitch

    Joined:
    Apr 24, 2013
    Posts:
    270
    I am curious, why would the firewall be in any way involved when Unity's compiler is trying to write/read a file on the local development machine?