In the application event log I found several errors that were pointing to assemblies that I wasn’t using anymore. The error looks like the message below: Error: Failure in loading assembly: Assembly, Version=18.104.22.168, Culture=neutral, PublicKeyToken=Token.
The application was trying to load an assembly that I wasn’t in the GAC or in the BIN folder. This causes the error so I searched trough the complete solution for references to the specified assembly but couldn’t find any. After searching I opened the web.config file of the web application and the one from central administration and saw that there were safecontrols registered to assemblies that I wasn’t using anymore.
<SafeControl Assembly="Assembly, Version=22.214.171.124, Culture=neutral, PublicKeyToken=Token" Namespace="Namespace" TypeName="*" Safe="True" />
By deleting these safecontrol the problem was solved.