Add this line in all the projects of Enterprise Library
[assembly: System.Security.AllowPartiallyTrustedCallers]
Usually the Object Builder code is not available.
Download it from CodePlex
Make sure you add the line [assembly: System.Security.AllowPartiallyTrustedCallers] to this project also.
Make sure you reference Object Builder in other Enterprise Library projects
In the web.config add requirePermission = false in the dataconfiguration section