none
How to repair .Net on Windows 2012 R2? RRS feed

  • Question

  • Hi,

    I was referred to this forum in a comment by Aaron Stebner.

    I recently had a 2012 R2 Essentials server become unmanageable because all .NET apps (including Server Manager and Essentials Dashboard) were crashing. The next morning, it was working again. So I'm trying to to figure out what was wrong and how it fixed itself. Are there logs I can review that would tell me that?

    Also if this happens again, is there a way to repair .NET, or if in fact it is self-healing, to trigger that process?

    So far the best advice I've heard is to use DISM to disable and re-enable .Net 3 and 4:

    DISM /online /disable-feature /FeatureName:NetFx3
    DISM /online /enable-feature /FeatureName:NetFx3 /all /Source:X:\sources\sxs /LimitAccess

    DISM /online /disable-feature /FeatureName:NetFx4
    DISM /online /enable-feature /FeatureName:NetFx4 /all /Source:X:\sources\sxs /LimitAccess

    Disabling such core OS components makes me nervous. Is that the correct approach (and are those the correct commands)? Or would something like ""Dism /Online /Cleanup-Image /RestoreHealth" work?

    Thanks,

    Mark Berry
    MCB Systems



    • Edited by mcbsys Thursday, January 30, 2014 6:44 AM
    Thursday, January 30, 2014 6:43 AM

All replies

  • Hi Mark,

    Please clarify what version of .NET you want to repair.

    You may know that the tool you meantioned http://www.microsoft.com/en-us/download/details.aspx?id=30135 does not have Windows Server 2012 as a supported system, so I cannot guarantee this tool will work for you.

    By the way, since.NET 3.5 and .NET 4.5 is embeded in Windows Server 2012. To konw if they are installed without problem, you'd better use this tool:

    http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx

    To repair, as far as I know, you have to insert your OS CD and repair your OS.

    Regards,



    Barry Wang
    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, January 31, 2014 2:16 AM
    Moderator
  • Barry,

    Thank you for your reply.

    > Please clarify what version of .NET you want to repair.

    It was v4.0.30319 that was crashing, but I figured I should repair both embedded versions, which according to the feature list are 3.5 and 4.5.

    > You may know that the tool you mentioned...

    I was not referring to that tool, but to the comments at the end of that blog post. In the comments, the author advises using DISM for the repair, and coming to this forum for details.

    > ... you'd better use this tool ...

    The person who wrote that tool is the one who advised me to come here. He did not mention using that tool.

    > ... insert your OS CD and repair your OS.

    Thank you for this suggestion. Is this safer or better than disabling and enabling the features via DISM?

    Also: how can I figure out what happened, and how did it fix itself?

    Thank you,

    Mark Berry
    MCB Systems

    • Edited by mcbsys Friday, January 31, 2014 2:48 AM
    Friday, January 31, 2014 2:46 AM
  • Hi Mark,

    >> It was v4.0.30319 that was crashing, but I figured I should repair both embedded versions

    I'm not so sure whether .NET 4 is the problem to your issue so please run that verify tool first and share the result to me. Actually if .NET 4 is the reason, you will need to fix .NET 4.5 first

    >> The author advises using DISM for the repair

    The command in your post is always for those who do not have .NET feature installed and want to enable it from their disk.

    Check this command:

    DISM /online /enable-feature /FeatureName:NetFx3 /all /Source:X:\sources\sxs /LimitAccess

    /online controls whether source can be detected online

    /enable feature just means itself

    /Source is to specify your ISO location to locate .NET source

    Details for this command can be referred from here: http://msdn.microsoft.com/en-us/library/jj980032(v=winembedded.81).aspx

    I should say that disable/enable  feature is not make sense on your issue however you can take it a try.

    So let's do a summary:

    1. You have to figure out what happened. How to do? Check possible solutions:

    a) Use event log to see what happened when your application crashed.

    b) Boot your OS under safe-mode to check. And most impoartant, close your anti-virus software

    c) If the application is developed yourself, make sure you will log every thing when your app is running.

    2. You will also need to run the tool to check .NET installed on your OS. It will help you verify files

    3. If .NET is corrupt, you can try some steps with the following order:

    a) Use .NET repair tool I mentioned first

    b) If failed, use dism to have a try

    c) If still failed, the last choice is to repair or reinstall your OS. I'm not a expert about this and please consult it on http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserver8setup&filter=alltypes&sort=lastpostdesc

    Regards,



    Barry Wang
    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, January 31, 2014 3:02 AM
    Moderator
  • Hi Barry,

    Thanks for your reply and suggestions.

    Since the system is no longer experiencing problems, I do not want to try any changes. I am just trying to do analysis and preparation in case it happens again.

    It is not clear to me which support group/forum handles .NET issues for embedded versions of .NET. Maybe I should be addressing this in the general server forum. I have already discussed it in the partner server forum--that is where the DISM suggestion came from.

    The apps that were failing were all from Microsoft (Server Manager, Essentials Dashboard). Here is an example of the event log:

    Log Name:      Application
    Source:        .NET Runtime
    Date:          1/23/2014 7:22:36 PM
    Event ID:      1026
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      MyServer.mydomain.local
    Description:
    Application: Dashboard.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: exception code c0000005, exception address 0000000000000000

    Log Name:      Application
    Source:        Application Error
    Date:          1/23/2014 7:22:36 PM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      MyServer.mydomain.local
    Description:
    Faulting application name: Dashboard.exe, version: 6.3.9600.16384, time stamp: 0x5215cf5a
    Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
    Exception code: 0xc0000005
    Fault offset: 0x0000000000000000
    Faulting process id: 0x17bc
    Faulting application start time: 0x01cf18b37e0a2809
    Faulting application path: C:\Windows\system32\Essentials\Dashboard.exe
    Faulting module path: unknown
    Report Id: c4dd725d-84a6-11e3-80d1-fc4dd4d2c17c
    Faulting package full name:
    Faulting package-relative application ID:

    I wondered if it could be a certificate issue as described in this post:

    http://social.technet.microsoft.com/Forums/en-US/fa27af10-d69a-453a-b0e5-ef307ad5125d/sbs-dashboard-error-an-error-prevented-the-dashboard-from-opening?forum=smallbusinessserver2011essentials

    And in fact, there was a 5061 Audit Failure in the Security log relating to the Machine key:

    Log Name:      Security
    Source:        Microsoft-Windows-Security-Auditing
    Date:          1/23/2014 6:44:50 PM
    Event ID:      5061
    Task Category: System Integrity
    Level:         Information
    Keywords:      Audit Failure
    User:          N/A
    Computer:      MYSERVER.MYDOMAIN.local
    Description:
    Cryptographic operation.
    Subject:
        Security ID:        SYSTEM
        Account Name:        MYSERVER$
        Account Domain:        MYDOMAIN
        Logon ID:        0x3E7
    Cryptographic Parameters:
        Provider Name:    Microsoft Software Key Storage Provider
        Algorithm Name:    UNKNOWN
        Key Name:    MYDOMAIN-MYSERVER-CA-Xchg(18)
        Key Type:    Machine key.
    Cryptographic Operation:
        Operation:    Open Key.
        Return Code:    0x8009001

    If you have any further ideas, I would be glad to hear them.

    Regards,

    Mark Berry
    MCB Systems

    Friday, January 31, 2014 5:35 PM
  • Hello Mark,

    From your post actually I don't think .NET 4 is corrupt on your OS. The event log shows this issue was due to something like access denied and security not allowed you to do something. And I agree you'd better check more things around your permissions, such as certificate or user account permission.

    Regards,



    Barry Wang
    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, February 7, 2014 8:36 AM
    Moderator
  • For the sake of posterity, this needs correction..

    The "/online" switch of DISM has nothing to do with using online sources to repair, it just specifies to run the selected commands on the current 'online' version of Windows, ie. the one you are currently running.  This is useful for working on network or other disk installs of windows, which you would mount with the appropriate command line switch.

    You select your sources with the "/source" switch, and can limit access to only sources using the '/limitaccess' switch.  Refer to the DISM documentation for more info.

    Tuesday, November 24, 2015 6:54 PM
  • n0cturne, thanks for that.

    Also for the sake of posterity, I should perhaps post that the solution was to temporarily uninstall HimanPro.Alert:

    http://www.mcbsys.com/blog/2015/02/hitmanpro-alert-blocks-net-3-5-install/

    Mark Berry
    MCB Systems

    Tuesday, November 24, 2015 7:03 PM
  • Hi,

    I was referred to this forum in a comment by Aaron Stebner.

    I recently had a 2012 R2 Essentials server become unmanageable because all .NET apps (including Server Manager and Essentials Dashboard) were crashing. The next morning, it was working again. So I'm trying to to figure out what was wrong and how it fixed itself. Are there logs I can review that would tell me that?

    Also if this happens again, is there a way to repair .NET, or if in fact it is self-healing, to trigger that process?

    So far the best advice I've heard is to use DISM to disable and re-enable .Net 3 and 4:

    DISM /online /disable-feature /FeatureName:NetFx3
    DISM /online /enable-feature /FeatureName:NetFx3 /all /Source:X:\sources\sxs /LimitAccess

    DISM /online /disable-feature /FeatureName:NetFx4
    DISM /online /enable-feature /FeatureName:NetFx4 /all /Source:X:\sources\sxs /LimitAccess

    Disabling such core OS components makes me nervous. Is that the correct approach (and are those the correct commands)? Or would something like ""Dism /Online /Cleanup-Image /RestoreHealth" work?

    Thanks,

    Mark Berry
    MCB Systems



    Thanks!  My .net 4 was not working properly and preventing server manager from working.  Disabling NetFx4 and reenabling it fixed the issue.  The only gotcha is that I had to also reinstall Server-Gui_Mgmt-Infra and Server-Gui-Shell which I did from powershell.
    Monday, August 19, 2019 2:23 PM
  • did you reboot after disabling the .net4 feature thru dism command? i noticed it prompts to restart after disabling it. 

    Christopher Gatling Lan Administrator Baltimore, MD.

    Friday, December 13, 2019 3:04 PM