So far what i have done is, i have allowed anonymous user access to my web app from the Central admin. Then I gave permissions to anonymous user from my top level site. Now, when i open y site, the read only page shows, but when i click on my shared documents library, it keeps on asking me for credentials. Also, when i try to access any other lists, sometimes it automatically takes administrator credentials and logs in using admin.
It might be because the site is running in LockDown mode. This mode is controlled by
ViewFormPagesLockdown feature. You can disable this mode by deactivating this feature.
$lockdown = get-spfeature viewformpageslockdown disable-spfeature $lockdown -url http://sitecollectionURL
If SP2010 after deactivating , disable and re-enable the anonymous access in the site collection