Sign In  Sign Up Live-Chat

DotNetNuke - Aspose Grid Not Loading Properly First Time

Last post 07-28-2008, 11:37 PM by henry. 9 replies.
Sort Posts: Previous Next
  •  05-07-2008, 7:31 AM 125801

    DotNetNuke - Aspose Grid Not Loading Properly First Time

    I'm using DotNetNuke (4.8.2) and am using Aspose Grid Web (1.9.4.0) 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...

      <add key="aspose.grid.web.agw_client_path" value="/Portals/agw_client" />
      <add key="aspose.grid.web.force_script_path" value="true"/>

    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?

     
  •  05-07-2008, 8:47 AM 125820 in reply to 125801

    Re: DotNetNuke - Aspose Grid Not Loading Properly First Time

    Hi,

    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. 


    Amjad Sahi
    Support Developer,
    Aspose Nanjing Team
    Contact Us
     
  •  05-07-2008, 9:28 PM 125923 in reply to 125801

    Re: DotNetNuke - Aspose Grid Not Loading Properly First Time

    Hi,

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

     


    Henry Xu
    Developer
    Aspose Nanjing Team
    About Us
    Contact Us
     
  •  05-14-2008, 2:41 PM 127006 in reply to 125923

    Re: DotNetNuke - Aspose Grid Not Loading Properly First Time

    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?

        <add key="AposeGridLicenseKeyLocation" value="C:\Inetpub\wwwroot\portals\Aspose.Total.lic" />
        <add key="AsposeTotalLicense" value="C:\Inetpub\wwwroot\portals\Aspose.Total.lic" />

    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.

     
  •  05-14-2008, 8:10 PM 127046 in reply to 127006

    Re: DotNetNuke - Aspose Grid Not Loading Properly First Time

    Hi,

       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:

    http://www.aspose.com/documentation/visual-components/aspose.grid-for-.net/licensing.html

     


    Henry Xu
    Developer
    Aspose Nanjing Team
    About Us
    Contact Us
     
  •  05-19-2008, 9:38 AM 127694 in reply to 127046

    Re: DotNetNuke - Aspose Grid Not Loading Properly First Time

    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 <HEAD> section of the html...

    <script type="text/javascript" language="javascript" src="/Portals/Default.aspx/lang_en.js"></script><link href="/agw_client/menu.css" rel="stylesheet" type="text/css" />

    In the <BODY> 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)

      <div id="dnn_ctr1787_ViewGenContactsEditor_grdContacts" scbcolor="#EEEEFF" acttab="0" freeze="1" editmode="1" showload="1" acbcolor="#DDDDFF" ahcolor="#CCCCFF" stdb="1" clientro="1" agw_client_path="/Portals/Default.aspx/" ahbcolor="#0055BB" sccolor="Black" clientfrz="1" bindingsrc="1" forcevalid="1" image_file_path="/agw_client/" accolor="Black" clientresize="1" style="display:inline-block;height:500px;width:800px;behavior:url('/Portals/Default.aspx/commonbehav.htc');">
       <xml id="dnn_ctr1787_ViewGenContactsEditor_grdContacts_XML1"></xml><xml id="dnn_ctr1787_ViewGenContactsEditor_grdContacts_XML2"></xml><input type=hidden id="dnn_ctr1787_ViewGenContactsEditor_grdContacts_XMLDATA" name="dnn$ctr1787$ViewGenContactsEditor$grdContacts_XMLDATA"><input type=hidden id="dnn_ctr1787_ViewGenContactsEditor_grdContacts_VMARK" name="dnn$ctr1787$ViewGenContactsEditor$grdContacts_VMARK"><a id="dnn_ctr1787_ViewGenContactsEditor_grdContacts_EVENTBTN" onclick="__doPostBack('dnn$ctr1787$ViewGenContactsEditor$grdContacts',this.agwEventData);event.cancelBubble=true;" style="display:none;"></a><div id="dnn_ctr1787_ViewGenContactsEditor_grdContacts_CMENU" style="behavior:url('/Portals/Default.aspx/menu.htc');">

       </div><div id="dnn_ctr1787_ViewGenContactsEditor_grdContacts_LMENU" style="behavior:url('/Portals/Default.aspx/menu.htc');">

       </div><table id="dnn_ctr1787_ViewGenContactsEditor_grdContacts_FRAMETAB" class="dnn_ctr1787_ViewGenContactsEditor_grdContacts_0" cellspacing="0" cellpadding="0" border="0" style="height:100%;width:100%;">
        <colgroup>
         <col style="width: 30pt;" /><col />
        </colgroup><tr style="height:15pt;">
         <td align="left" valign="top"><div id="dnn_ctr1787_ViewGenContactsEditor_grdContacts_leftTopPanel" style="height:100%;width:100%;overflow:hidden;">
          <table class="dnn_ctr1787_ViewGenContactsEditor_grdContacts_4" cellspacing="0" cellpadding="0" border="0" style="height:100%;width:100%;filter:alpha(Opacity=50,FinishOpacity=100,Style=1,StartX=0,FinishX=0,StartY=0,FinishY=75);">
           <tr>
            <td class="dnn_ctr1787_ViewGenContactsEditor_grdContacts_5" align="center" valign="middle">&nbsp;</td>
           </tr>
          </table>

     
  •  05-20-2008, 3:42 AM 127814 in reply to 127694

    Re: DotNetNuke - Aspose Grid Not Loading Properly First Time

    Hi,

      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?


    Henry Xu
    Developer
    Aspose Nanjing Team
    About Us
    Contact Us
     
  •  07-23-2008, 1:04 PM 136644 in reply to 127814

    Re: DotNetNuke - Aspose Grid Not Loading Properly First Time

    Hi,

    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. 

    BR

     

     
  •  07-23-2008, 2:35 PM 136665 in reply to 136644

    Re: DotNetNuke - Aspose Grid Not Loading Properly First Time

    Hi,

    We will check your issue soon.

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Nanjing Team
    Contact Us
     
  •  07-28-2008, 11:37 PM 137269 in reply to 136665

    Re: DotNetNuke - Aspose Grid Not Loading Properly First Time

    Hi,

       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();
      lic.SetLicense("d:\\temp\\lic1\\aspose.grid.lic");
     }
     
        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

      <add key="aspose.grid.web.agw_client_path" value="/agw_client/"/>
      <add key="aspose.grid.web.force_script_path" value="true"/>


    Henry Xu
    Developer
    Aspose Nanjing Team
    About Us
    Contact Us
     
View as RSS news feed in XML