Well a null reference exception usually indicates something is missing like a control it expects or depends on. I cannot replicate the problem, so my advice would be to try redeploying all of the files and watch carefully for failed transfers.
It is not a medium trust error and the error you posted for medium trust is always expected to be logged when the application start event fires if using medium trust and .NET 3.5.
Hope that helps,
Joe