Grid 3.6 Pro Export to Excel via ASP .Net Error

Setup is as follows:

  • Grid has been working for a long time (Grid var = bbygrid)
  • Need to export to Excel. I am assuming that the .toExcel function grabs all the data in the grid (which does not use paging or smart rendering) and streams the XML to waiting .ASHX page
  • added download (grid-excel-net.zip) to webserver and unzipped into new subdirectory under grid.
  • On Windows 2012 64 bit and IIS 8.4, Application pool has 32 bit App’s enabled, .Net level is 4.0 and pipeline mode is Integrated
  • added following to source code:

function exportXgridCell() {
bbygrid.toExcel(‘/eb2b-jscript/dhtmlxGrid/codebase/grid-excel-net/Generate.ashx’);
}

Receiving error:
Event code: 3006
Event message: A parser error has occurred.
Event time: 12/15/2015 5:12:26 PM
Event time (UTC): 12/15/2015 10:12:26 PM
Event ID: 6b6147a5dd3d4c31b0d09f54fa5bc907
Event sequence: 4
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-1-130946911460958411
Trust level: Full
Application Virtual Path: /
Application Path: C:\tgw-www-stg\
Machine name: WWWSTAGING3

Process information:
Process ID: 4864
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: HttpParseException
Exception message: Could not create type ‘Generator.Generator’.

QUESTIONS:

  • Has anyone seen this error before?
  • Is using Grid Pro enough to be able to use the convert Excel?
  • Is .Net 4.0 okay or should it be .Net 2.0?
  • How do I change the output directory for the generated Excel file?
  • Using a JavaScript call directly to .toExcel is okay? i.e. a jquery / ajax http request isn’t necessary (i.e. .toExcel does it for me)

Thanks, Rich

Okay, one of the k-bases mentions the same error and says to:
if the class name and namespace is correct, try to explicitly build your application

I am not a big .Net ASP expert, if I compile using MSBuild.exe (specifying 3.5 .Net since that is in the csproj’s), pointing at DHTMLX.Export.Excel.sln will that build everything that needs to get built? Thanks. I’ll try the rebuild and see what happens.

Regards,

Rich

PS C:\windows\microsoft.net\framework\v3.5>
.\msbuild “…your dir location … DHTMLX.Export.Excel.sln” /t:Rebuild /p:Configuration=Release /toolsversion:3.5 /p:PlatformTarget=x86

Okay, did the build but received this warning:

[i]GetFrameworkPaths:
Could not locate the expected version of the Microsoft Windows SDK. Looked for a location specified in the “Installation Folder” value of the registry key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A”. If your build process does not need the SDK then this can be ignored. Otherwise you can solve the problem by doing one of the following:

  1. Install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5.
  2. Install Visual Studio 2008.
  3. Manually set the above registry key to the correct location.[/i]

Anyone know if this matters for Grid 3.6 Pro?

Regards,

Rich

thanks for sharing information…