none
The Microsoft .NET Framework NGEN v3.0.40314_X64 service has reported an invalid current state 120 RRS feed

  • Question

  • Hi,

    I have a problem with my NET framework.

    In the event viewer this error is presenting itself about 700-900 times every second non stop.
    I have tried alot of thing to resolve the issue with no luck.

    have i come to the right place to ask for help with this?

    Here are the details from event viewer.

    • Message: The Microsoft .NET Framework NGEN v3.0.40314_X64 service has reported an invalid current state 120.
    • Source: Service Control Manager
    • Event ID: 7016
    • Service: clr_optimization_v3.0.40314_64
    • Path to executable: C:\WINDOWS\Microsoft.NET\Framework64\v3.5\Mscorsv.exe C:\Windows\Microsoft.NET\Framework64\v3.5\xml.xsl
    • Startup type: Automatic

    Tuesday, August 23, 2016 5:47 PM

All replies

  • Hi Tor Larsen,

    Welcome to the MSDN forum.

    According to the error message and Event ID 7016, please check here: https://support.microsoft.com/en-us/kb/320789

    If a service is not written correctly, the Service Control Manager (SCM) may log the following error in the system event log when you use the net start command to start the service.

    To resolve this issue, the service ‘clr_optimization_v3.0.40314_64’ must be fixed (rewritten correctly) so that it reports a valid status when it receives a SERVICE_CONTROL_INTERROGATE (or any other) control code from the SCM. Firstly, review the current status of the service, review the Event logs for other related events that have been logged by the Service Control Manager (SCM) Eventlog Provider, and then trigger an update of the status of the service in SCM.

    For the detail procedures, please have a look at this actricle: https://technet.microsoft.com/en-us/library/cc756305(v=ws.10).aspx

    Best regards,

    Sara



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.


    Wednesday, August 24, 2016 6:26 AM
    Moderator
  • Thank you Sara for your reply and for the welcome.

    I have done a review of the current status of the service:
    C:\WINDOWS\system32>sc queryex clr_optimization_v3.0.40314_64

    SERVICE_NAME: clr_optimization_v3.0.40314_64
            TYPE                             : 10  WIN32_OWN_PROCESS
            STATE                           : 4  RUNNING
                                                       (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
            WIN32_EXIT_CODE    : 0  (0x0)
            SERVICE_EXIT_CODE : 0  (0x0)
            CHECKPOINT                : 0x0
            WAIT_HINT                  : 0x0
            PID                                : 884
            FLAGS                           :

    Then i did a review for related events loged by the SCM. There were no other events other than the 7016 currently being reported.

    Then i updated the status of the service in SCM
    C:\WINDOWS\system32>sc interrogate clr_optimization_v3.0.40314_64

    SERVICE_NAME: clr_optimization_v3.0.40314_64
            TYPE                              : 10  WIN32_OWN_PROCESS
            STATE                            : 4  RUNNING
                                                         (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
            WIN32_EXIT_CODE     : 0  (0x0)
            SERVICE_EXIT_CODE   : 0  (0x0)
            CHECKPOINT                 : 0x0
            WAIT_HINT                   : 0x0

    Then i verified the state of the service:
    sc interrogate
    C:\WINDOWS\system32>sc interrogate clr_optimization_v3.0.40314_64


    SERVICE_NAME: clr_optimization_v3.0.40314_64
            TYPE                              : 10  WIN32_OWN_PROCESS
            STATE                            : 4  RUNNING
                                                         (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
            WIN32_EXIT_CODE     : 0  (0x0)
            SERVICE_EXIT_CODE   : 0  (0x0)
            CHECKPOINT                 : 0x0
            WAIT_HINT                   : 0x0

    sc qc
    C:\WINDOWS\system32>sc qc clr_optimization_v3.0.40314_64

    [SC] QueryServiceConfig SUCCESS

    SERVICE_NAME: clr_optimization_v3.0.40314_64
            TYPE                               : 10  WIN32_OWN_PROCESS
            START_TYPE                  : 2   AUTO_START
            ERROR_CONTROL         : 0   IGNORE
            BINARY_PATH_NAME   : C:\WINDOWS\Microsoft.NET\Framework64\v3.5\Mscorsv.exe C:\Windows\Microsoft.NET\Framework64\v3.5\xml.xsl
            LOAD_ORDER_GROUP   :
            TAG                                  : 0
            DISPLAY_NAME              : Microsoft .NET Framework NGEN v3.0.40314_X64
            DEPENDENCIES               :
            SERVICE_START_NAME  : LocalSystem

    sc queryex
    C:\WINDOWS\system32>sc queryex clr_optimization_v3.0.40314_64

    SERVICE_NAME: clr_optimization_v3.0.40314_64
            TYPE                              : 10  WIN32_OWN_PROCESS
            STATE                            : 4  RUNNING
                                                         (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
            WIN32_EXIT_CODE    : 0  (0x0)
            SERVICE_EXIT_CODE  : 0  (0x0)
            CHECKPOINT                : 0x0
            WAIT_HINT                  : 0x0
            PID                                : 804
            FLAGS                           :

    What do the results tell us?

    Wednesday, August 24, 2016 4:29 PM
  • Hi Tor Larsen,

    According to the result (Exit code 0x0) in your last reply, it looks like this server already written correctly. after that, did you still get the previous error in the event viewer?

    Best regards,

    Sara


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Thursday, August 25, 2016 5:05 AM
    Moderator
  • Hi Sara,

    Yes i still get the previous error in the event viewer.

    Thursday, August 25, 2016 10:04 AM
  • I am going over my system again to verify what versions of .NET Framework I have installed.

    According to .NET Framework Setup Verification Utility I have:

    • .NET Framework 2.0 SP2

    • .NET Framework 3.0 SP2

    • .NET Framework 3.5 SP1

    • .NET Framework 4 Client

    • .NET Framework 4 Full

    • .NET Framework 4.5

    • .NET Framework 4.5.1

    • .NET Framework 4.5.2

    • .NET Framework 4.6

    • .NET Framework 4.6.1

    I then ran a tool called Microsoft .NET Framework Repair tool. This tool recommends a repair on .NET Framework 4.6.1 but it does not seem to repair anything.

    I tried uninstalling .NET Framework 4.6.1. (the Windows update named KB3102467). But an error message appears saying: "An error has occurred. Not all of the updates were successfully uninstalled".

    I then tried to install .NET Framework 4.6.1 to see if that could fix anything, but the .NET Framework 4.6.1 installer could not proceed because .NET Framework 4.6.1 is already installed.

    • Edited by Tor Larsen Thursday, August 25, 2016 12:15 PM
    Thursday, August 25, 2016 12:04 PM
  • Hi Tor,

    Thank you for your update.

    Please try to run the command: sfc /scannow in the elevated command prompt to scan and repair the required file, once some files were missing.

    BTW, what's your OS version?

    Best regards,

    Sara


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Friday, August 26, 2016 9:26 AM
    Moderator
  • Hi Sara,

    sfc /scannow running now.

    My OS is Win 8.1 Pro.

    Friday, August 26, 2016 12:57 PM
  • Ok the scan just finished. here is what it says:

    Windows Resource Protection found corrupt files but was unable to fix some
    of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log.

    i will browse through the log file. are there something specific i should look for?

    Friday, August 26, 2016 1:09 PM
  • Reading throuhg the CBS.log, I cannot find any entry that states a problem related to .NET Framework.

    There are alot of "Ignoring duplicate ownership" and "[DIRSD OWNER WARNING] *some text* is not owned but specifies SDDL...".

    There were four lines saying: "Repairing corrupted file -> C:\WINDOWS\System32\GWX". I did stop the GWX notification a while back by editing the registry and doing some other things. That may explain the corrupted files.

    also some "Could not get active session for current session file" and "Not able to add pending.xml/SCM.EVM to Windows Error Report -> ERROR_FILE_NOT_FOUND"

    EDIT:

    I noticed now that the error report from yesterday changed the message ending from "current state 120" to "current state 0".

    But today it says 120 again

    EDIT 2:

    After a closer inspection of the CBS.log i found this:

    0000041b [DIRSD OWNER WARNING] Directory [ml:520{260},l:90{45}]"\??\C:\WINDOWS\Microsoft.NET\Framework64\v3.5" is not owned but specifies SDDL in component Microsoft-Windows-NETFX35WPFComp, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type neutral, TypeName neutral, PublicKey neutral

    There are more like this one.

    • Edited by Tor Larsen Friday, August 26, 2016 3:07 PM
    Friday, August 26, 2016 2:14 PM
  • Hi Tor,

    About the result of the command: sfc/scannow, please have a look at this : https://support.microsoft.com/en-gb/kb/929833

    Transfer the CBS.Log file to the Sfcdetails.txt and it will more convienient for your to locate the corrupted files and could not be repaired through the detail information in the Sfcdetails.txt file, find where the corrupted file located, and then manually replace the corrupted file with a known good copy of the file.

    Meanwhile, you can also upload the CBS.Log file to https://onedrive.live.com/ and share the link here.

    Best regards,

    Sara



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Sunday, August 28, 2016 4:55 AM
    Moderator
  • Hi Sara,

    I have been out of town for a while. Thank you for your reply and help!

    Here are a link to the CBS.log and sfcdetails.txt files on my onedrive:

    https://1drv.ms/f/s!AvWSZo9YZJS_gQCnL05R-gFhe2Qy

    I dont know if i am reading the file the right way

    Regards

    Tor Larsen


    • Edited by Tor Larsen Tuesday, September 6, 2016 10:03 PM
    Tuesday, September 6, 2016 10:02 PM
  • Hi Tor Larsen,

    I have checked your sfcdetails.txt and I found it display the sentence "Verify and Repair Transaction completed. All files and registry keys listed in this transaction  have been successfully repaired" at the end, it looks like all corrupted files already be repaired.

    Best regards,

    Sara


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Thursday, September 8, 2016 8:50 AM
    Moderator
  • Hi Sara,

    So the sfc scan fixed something, but the original error still remain.

    are there anything else we can do? Any way to uninstall everything related to .NET framework and start fresh?

    Regards

    Tor Larsen

    Thursday, September 8, 2016 11:59 AM
  • Hi Tor,

    There is an .NET Framework uninstall tool: http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/dotnetfx_cleanup_tool.zip, but it will remove all installed .NET Framework versions, not sure it will effect some programs that used or shared the .NET Framework versions or not.

    Best regards,

    Sara


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Friday, September 9, 2016 7:05 AM
    Moderator