Uf.. finally found the issue. The problem was because application A is targeting .NET Framework 4.5 and application B is targeting .NET Framework 4.
I suspected this before but apparently changing the target framework in the Project Properties is not enough. You have to add this <httpRuntime targetFramework="4.5"/>
to application B web.config to make it works.