I am Dale Hayter, a Microsoft and VMware certified Technical Consultant.

My blog has been built up over the years from my experience of working on an IT helpdesk and also from being out on-site.

SBS 2011 RDWeb Shared Folders – An unexpected error occured

Had an interesting problem today with a 2011 SBS server. The problem was that when users went to the remote desktop workplace website RDWeb. They were unable to browse through the Shared Folders.

RDSweb8

When the users clicked on a folder they were greeted by the error message :

An unexpected error occurred. Please try again. If the problem continues, contact the person who manages your server
RDSweb

The first place to investigate was the SBS servers application event log. There were numerous errors with an event id of 3 and Source System.ServiceModel 4.0.0.0.

The error below presented itself everytime you clicked on a folder.

WebHost failed to process a request. Sender information : System.ServiceModel.Activation.HostedHTTPRequestAsyncResult/17653682 Exception: System.ServiceModel.ServiceActivationException: The service '/Remote/BuiltIns/RDP/RemoteDesktopWebService.svc' cannot be activated due to an exception during compilation.

The error then went on to say :

The exception message is: Memory gates checking failed because the free memory (48817920 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming request

I have included a screenshot of the full error below as it goes on a bit..

rdsinstall15

So from this error we know that the reason why it wont work is because the free memory is less than 5% of the server. This must be something built into SBS as i’ve never seen this before.

A quick workaround to get your users up and running is to free up some memory. Restart the Information Store service and you should be good.

From looking around there seem to be 2 permanent solutions.

1) Set the threshold to lower than 5%
2) Limit the Exchange Server store.exe from taking up all the memory.

I decided to go with option 2 as the server is used in a very small environment and store.exe was taking up 8gb.

RDSweb2

To carry this out we need to change 2 attributes in ADSIedit.

MsExchESEParamCacheSizeMax and MsExchESEParamCacheSizeMin.

First of all lets open adsiedit.msc. Then select “select a well known Naming Context”. In the drop down box select Configuration. Then click ok

RDSweb3

Then drill down to the location we need.

Configuration > Services > Microsoft Exchange > > Administrative Groups > > Servers > > InformationStore

RDSweb4

Right click on the CN=InformationStore container and click properties.

RDSweb5

In the Attribute Editor tab scroll down until you find the 2 attributes MsExchESEParamCacheSizeMax and MsExchESEParamCacheSizeMin.

RDSweb6

You now want to populate these fields with your desired values. For me I want to set the server to 6GB Max. So you have to work out the value to enter. 6GB is 6.291.456 KB then you want to divide that number by 32. This gives us a max value of 196608.

I’ve put some values in below pre calculated

8GB = 262144
6GB = 196608
4GB = 131072
2GB = 65536

I then set a minimum size of 4GB.

RDSWEB

Now restart the Information Store Service and your all good.

After a while you should find the store.exe process hovers between 4 and 6GB memory usage.

Memory After

Source for limiting Exchange Database Cache : Here.