Community Server 2.1 (including SP1) will not quite run in Medium Trust. I have found that it needs WebPermissions or the Feed Reader doesn't work correctly. See Community Server Feed Reader Fails in Medium Trust Level. And I have found that it requires ReflectionPermissions because of code in Global Application_End. If ReflectionPermissions are not granted, you'll see exceptions like this in the Windows Event Viewer (Application section).
This post proposes a solution if you have access to the following folder on your server:
By default, this location is C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
Here are the steps: