SharePoint Crawl Log Error: “The SharePoint item being crawled returned an error when attempting to download the item” .. for eg. *.aspx files

After some research I found a solution for that problem

Open Regedit on your search server/s
Navigate to this registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Global\Gathering Manager

Change Value "UserAgent" from  "MSIE 4.01" to "MSIE 8.0"

Restart the SharePoint Search Service.

Open a SharePoint PowerShell


If this returns false then we need to deploy one

Enable-SPSessionStateService -DatabaseName “NameOfDatabase”