If you enable DevErrors in the web.config file, you would see a screen similar to this when you open CRM.
Cause: When developing the custom application, the project had a Global.asax added to it. When you compiled the project into a DLL the global.asax class was included in the compiled library. CRM 4.0 only requires a single Global.asax file and it has already included that in its own libraries.
Resolution: You need to remove the Global.asax from your project and compile it again. Put the revised dll in the bin folder and your CRM and the custom application is up and running.