Set the web resource to release mode.
Some changes for compatible with Autofac injection.