We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

DotNetNuke - Aspose Grid Not Loading Properly First Time

I'm using DotNetNuke (4.8.2) and am using Aspose Grid Web ( in one of my custom desktop modules. I have xhtmlmode set to false in the grid and enablesmartnavigation set to false. In the web.config file, along with my Aspose license location, I also have the following...

The problem we're experiencing in both test and production is that the Grid is not loading properly the first time but if you hit F5 it works fine (and on subsequent visits as long as it's in cache). When I use my IE DebugBar tool, when it's working I notice that one of the scripts on the pages source "/Portals/agw_client/lang_en.js". But when it doesn't work the script source is "/Portals/Default.aspx/lang_en.js" - it's like it's not pointing to the awg_client_path in the web.config the first time. When it doesn't load properly you can't click on any of the cells because it doesn't seem to be finding the client folder with the client-side scripts/css/htc/etc..

Any suggestions?


Could you eliminate the two lines in web.config and try to be utilized grid's defatult path for "agw_client" if it works fine. Well, it looks strange as you experiencing this issue, could you give us more details, your OS, DNN version, Browser Type, IIS settings etc. We will check your issue soon.

Thank you.


It seems to be a License issue. Where do you put the set license code? Please post the source file here.

I put the license files at c:\Inetpub\wwwroot\Portals

It is th Aspose.Total.lic file.

How would the license file cause the js paths to be messed up the first time?

It's like it's ignoring the client path in the web.config file. It even does this when I hard-code that path and set aspose.grid.web.force_script_path to false.

It's putting all the javascript and htc files in the "/Portals/Default.aspx/lang_en.js" - It's trying to use Default.aspx as a folder path. It doesn't make sense. I even tried putting the full web path in the web.config file and that didn't work either.

This behaves like this on our test server, production server, and even my local server of dotnetnuke. This aspose grid web is being used in a custom module.


Please check if the grid's image file path is set as desired? If so, the problem is most caused by incorrectly license settings. The gridweb doesn't read the web.config to set a license. You should put the license setting code in somewhere like Page_Load, Application_Start, etc. In an Application scrope, the license need to set only once. You may reference this page:


I do set the license in the page load event. I step through it and it doesn't throw an error or say it's an invalid license. Yes, the image path sets correctly, see example below.

In the section of the html...

In the section of the html... (Notice that a lot of these paths point to Default.aspx - that doesn't make sense - And once you hit F5 refresh it works fine and the paths point to the proper path)



We have just created a DNN 4.8.2 site and created a custom module with a GridWeb control embeded in it. We are making some test. Could you send me your module source files and your license file through my email?


I have the same problem too. Did you find a solution for this issue?

When I open the page for the first time, the scripts are pointing to /Default.aspx/*.* .(Ex.: Default.aspx/commonbehav.htc).The subsequent access have the scripts pointing to /agw_client/.

I'll appreciate a help.



We will check your issue soon.

Thank you.


We have found a solution. The problem is that the DNN load the grid before setting the license at the first time. So you may put the setting license code in the Module ascx's static constuction method. Here is a sample code:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using DotNetNuke.Entities.Modules;

public partial class DesktopModules_XtModules_ReqInfo_TestEditReqInfo : PortalModuleBase
static DesktopModules_XtModules_ReqInfo_TestEditReqInfo()
Aspose.Grid.Web.License lic = new Aspose.Grid.Web.License();

protected void Page_Load(object sender, EventArgs e)


We tested this code in DNN 4.8.2 and it works fine.

In addition, Since DNN doesn't use XHTML doc type, be sure set the grid's XhtmlMode="False".

And be sure add this settings to your web.confg