Quantcast
Channel: TechNet Technology News
Viewing all articles
Browse latest Browse all 13502

Troubleshooting “An unexpected error occurred” message when using Remote Web Access to connect to computers

$
0
0

[This post comes to us courtesy of Manish Kapoor from Commercial Technical Support]

We occasionally come across scenarios where memory consumption on an SBS Server increases and this may cause the server to run slow. Additionally, some of the services/features may stop working correctly, especially after applying .Net framework 4.5.1.

You may find that trying to connect to computers or accessing shares from within RWA may fail with an error message similar to the one below:

clip_image001

Another symptom might be that you try clicking on a gadget in RWA and nothing happens.

If you check the event logs, you will find this warning:

Log Name: Application
Source: ASP.NET 4.0.30319.0
Date: 9/17/2013 15:31:28
Event ID: 1309
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: SBS.Contoso.local
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 9/17/2013 15:31:28 Event time (UTC): 9/17/2013 13:31:28 Event ID: 401c8120945a4115abb39de75d347aba
Event sequence: 5
Event occurrence: 1
Event detail code: 0

Application information:

Application domain: /LM/W3SVC/1/ROOT/Remote-1-130099878420126008
Trust level: Full
Application Virtual Path: /Remote
Application Path: C:\Program Files\Windows Small Business Server\Bin\WebApp\RemoteAccess\
Machine name: SBS

Process information:

Process ID: 5100
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:

Exception type: InsufficientMemoryException
Exception message: Memory gates checking failed because the free memory (369917952 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

There could be multiple contributors to the above problem and here are a few suggestions to help mitigate them:

1. Do not install .NET Framework 4.5.1 on the server until there is an application requirement. None of the SBS features depend on this version of .NET Framework.    

2. If you have applied .NET Framework 4.5.1 recently, you can work around this issue by modifying the Remote Web Access web.config file. Here are the detailed steps: 

  • Open web.config file located at: “%ProgramFiles%\Windows Small Business Server\Bin\WebApp\RemoteAccess”.
  • Search in Web.config for "", change this line to "minFreeMemoryPercentageToActivateService="0"/>"
  • Save changes and close the file.
  • Run IISRESET from an elevated Command Prompt window

For more details on the root cause, information is available here: http://msdn.microsoft.com/en-us/vstudio/dn458357(v=vs.98).aspx3.

3. In general, you should not uninstall any versions of the .NET Framework that are installed on your computer, because an application in use may depend on a specific version of the .NET Framework. For more information, see The .NET Framework for Users in the Getting Started guide.

If you have no other applications installed on SBS Server and do need to uninstall .Net framework 4.5.1 and roll back to .Net 4.5, you can follow the steps below:

  • Uninstall .NET Framework 4.5.1
    Go to control panel, choose uninstall a program, Right click Microsoft .Net Framework 4.5.1 and select uninstall.
  • Install .NET Framework 4.5
    Download the .Net 4.5 from http://www.microsoft.com/en-in/download/details.aspx?id=30653 and install it on SBS server.
  • Go to %Windir%\System32\inetsrv\Config\ApplicationHost.Config and search the following settings listed for the application pools add the highlighted value as blow:

    managedRuntimeVersion="v4.0">

    managedRuntimeVersion="v4.0">

    managedRuntimeVersion="v4.0">

        Note: If you don't have .NET Framework 4.5.1 installed and are still running in the issue described above, you may need to analyze the memory usage of different processes running on the server and fine tune them. In such a scenario, normal performance troubleshooting steps apply. Capturing a Performance Monitor log and comparing it with baseline performance throughput should be the right way to move forward.


        Viewing all articles
        Browse latest Browse all 13502

        Trending Articles