Add targetFramework to the web.config file.
<compilation debug="false" strict="false" explicit="true" **targetFramework="4.0"** />
This usually happens when you port codes, in particular web methods, from an older version, say .net 3.5, to a newer version.
Arun
source share