Export to PDF / Excel not working with provided ASP code

When I use the provided ASP code for export to PDF and Excel. On PDF I get a nasty error at line 1 and on excel I do not get any action on click. Please help.

Here is the error

Server Error in ‘/’ Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not create type ‘Generator.Generator’.

Source Error:

Line 1: <%@ WebHandler Language=“C#” CodeBehind=“Generate.ashx.cs” Class=“Generator.Generator” %>

Source File: /Scripts/dhtmlxGrid/grid-pdf-net/Generate.ashx Line: 1

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17379

Any help,
I have the same problem.

I have this problem too. Someone has fixed it and could share how? Thanks a lot!