Open Forum

Expand all | Collapse all

The process cannot access the file 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\

Jump to Best Answer
  • 1.  The process cannot access the file 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\

    TOP CONTRIBUTOR
    Posted Oct 16, 2017 02:53 PM
    All of a sudden I cannot start any of my service tiers (fortunately this is in test). Here is the error message:
    Server instance: DynamicsNAV90
    Tenant ID:
    User:
    Type: System.IO.IOException
    Message: The process cannot access the file 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\Server\MicrosoftDynamicsNavServer$DynamicsNAV90\assembly\Record5407_47.dll' because it is being used by another process.
    StackTrace:
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.InternalDelete(String path, Boolean checkHost)
    at Microsoft.Dynamics.Nav.Runtime.CSharpCompiler.CompileCSharpSourceToAssembly(String assemblyFileName, String[] sourceFileNames, Boolean deleteAfterRead, String& errors, Assembly& assembly)
    at Microsoft.Dynamics.Nav.Runtime.AssemblyGetter.GetAssembly(ObjectType objectType, Int32 objectId, NavAppGroup appGroup)
    Source: mscorlib
    HResult: -2147024864

    The object (in this case Record5407) seems to change each time.

    We have 3 services tiers. I have restarted all of them, still same error. I have restarted SQL Server same error. I restarted all of the machines themselves same error. I compiled all objects (some didn't compile but that is nothing new), still same problem. I can't get a service tier to start to run the Object Tracking table. Maybe I should run the Object Tracking table in sql and delete everything and then re-compile again?

    ------------------------------
    Jason Wilder
    Senior Application Developer
    Stonewall Kitchen
    York ME
    ------------------------------


  • 2.  RE: The process cannot access the file 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\

    GOLD CONTRIBUTOR
    Posted Oct 16, 2017 03:55 PM
    Edited by Gino Pack Oct 16, 2017 03:56 PM
    What was trying to run just before this occurred? (You mention an object no - is it a table, report, XMLport, CodeUnit....)

    Are all 3 service tiers on the same NAV Server Physical Environment?

    Have you tried to go into SQL Activity Monitor and kill the process via SQL?

    ------------------------------
    Gino Pack
    Director of Information Systems
    Modern Optical International
    ROSELLE IL
    ------------------------------



  • 3.  RE: The process cannot access the file 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\

    TOP CONTRIBUTOR
    Posted Oct 17, 2017 08:02 AM
    Not much was going on.  I made a few changes to one codeunit periodically throughout the day.

    The service tiers are on the same host.  We rebooted the host and all service tiers.

    No process exists in SQL to kill.

    I tried deleting the records in the object tracking table but can't connect to service tier to recompile.  Suspect it does not have to do with this table.

    I removed all the files in the C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\Server\MicrosoftDynamicsNavServer$DynamicsNAV90\assembly directory but as soon as I start up the service tier I get the same message but it will list a different object each time.

    Fortunately I back up our test environment every 6 hours so I will restore back an earlier version.  Just nervous in case this ever happens in our Live environment.  Microsoft, it you happen to see this please respond!

    ------------------------------
    Jason Wilder
    Senior Application Developer
    Stonewall Kitchen
    York ME
    ------------------------------



  • 4.  RE: The process cannot access the file 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\

    TOP CONTRIBUTOR
    Posted Oct 17, 2017 08:29 AM
    Have you tried these steps? If it happens again, I guess:

    https://gallery.technet.microsoft.com/How-to-find-out-which-c0d4e60e

    ------------------------------
    Val Gameiro
    Senior NAV Analyst
    BPL Plasma
    Austin, Texas
    ------------------------------



  • 5.  RE: The process cannot access the file 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\

    TOP CONTRIBUTOR
    Posted Oct 17, 2017 09:28 AM
    I restored an earlier backup and still the problem persists (oh no!).  Then I realized that if I connect the service tier to a Cronus database on another server still same problem!

    This leads me to think it is totally server related not NAV (possibly due to windows updates).  Any service tier (they are all vm's) on that specific host does not work.  I pointed a service tier from a different host and it totally works.

    Our IT department is on it now and I will posted the answer as soon as we have it.

    ------------------------------
    Jason Wilder
    Senior Application Developer
    Stonewall Kitchen
    York ME
    ------------------------------



  • 6.  RE: The process cannot access the file 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\
    Best Answer

    TOP CONTRIBUTOR
    Posted Oct 17, 2017 10:26 AM
    Here is the solution and is pretty specific to our environment so others probably won't run into this.  We have some software on those service tiers called Bit9.  It was denying access to the folder that nav uses to write some files.  We simply disabled the software and we are all set now.

    ------------------------------
    Jason Wilder
    Senior Application Developer
    Stonewall Kitchen
    York ME
    ------------------------------



  • 7.  RE: The process cannot access the file 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\90\
    Best Answer

    TOP CONTRIBUTOR
    Posted Apr 30, 2019 01:16 PM
    It's a year and a 1/2 later and I am getting the same error message in NAV 2018 upon service tier startup.  The problem this time is pretty much the same thing.  Our security software (now Carbon Black) was blocking access to the folder listed above.  The solution is to allow access through Carbon Black.  Wanted to mention again since the error message is a little misleading.

    ------------------------------
    Jason Wilder
    Senior Application Developer
    Stonewall Kitchen
    York ME
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role