Follow the steps given below to fix this error
(1) Go to Start | Control Panel | Add and Remove Programs
(2) Click on the entry titled Microsoft .NET Framework 2.0 and select Change/Remove. The Microsoft .NET Framework 2.0 Setup dialog box opens up.
(3) Select the option titled Repair and the setup automatically performs the required repair work.
(4) You will be prompted to reboot the system after the completion of the process.
(5) Run the affected ASP.NET 2.0 application once again and the application should work fine without any problems.
NOTE : If you
have installed Visual Studio 2008 Beta or Visual Web Developer Express
Beta or .Net Framework 3.5, you may need to repair the .Net Framework
3.5 (Even though you use ASP.Net 2.X in your IIS 6). You may also need
to go to IIS control panel and re-select the ASP.Net version.