Looks like this error affects Events.aspx (Alerts & Activity > Events ) in NPM 12.1. Specifically, the page fails with this error if you choose any of the time-related filters in the GUI:

To fix, I added the following to inetpub\SolarWinds\web.config under the <system.web> section:
<location path="Orion/NetPerfMon/Events.aspx">
<system.web>
<httpRuntime maxRequestLength="1048576" executionTimeout="300" />
</system.web>
</location>
Restart the Solarwinds NetPerfMon website using Orion Service Manager after making this change.