Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
479
using custom location instead ig_common - Scripts load errors?
posted

Hi there I followed theis article on how to use web.config to change the directory locations but I get the following script load error:

---------------------------
Error
---------------------------
A Runtime Error has occurred.
Do you wish to Debug?

Line: 3311
Error: Sys.ScriptLoadFailedException: The script 'JS/NetAdvantage/20081CLR20/Scripts/ig_shared.js' failed to load. Check for:

 Inaccessible path.

 Script errors. (IE) Enable 'Display a notification about every script error' under advanced settings.

 Missing call to Sys.Application.notifyScriptLoaded().
---------------------------
Yes   No  
---------------------------

in my web.config I've got the following entries:

    <section name="infragistics.web" type="System.Configuration.SingleTagSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

... 

  <infragistics.web
    imageDirectory="JS/NetAdvantage/images"
    javaScriptDirectory="JS/NetAdvantage/20081CLR20/Scripts"
    cssDirectory="JS/NetAdvantage/20081CLR20/Styles"
    formsDirectory="JS/NetAdvantage/20081CLR20/Forms" />
 

 Things to note:

  •  I want to use relative paths as defined above because the app is deplaoyed in a virtual directory which name can vary.
  •  I use the WinGrid with the excel exporter only
  • When I try to access the reported javascript file in the error above: 'JS/NetAdvantage/20081CLR20/Scripts/ig_shared.js' the browser loads it witout problems so it is accessible.
  • I have checked the directory security and it is set to anonymous
  • IMPORTANT: The WebGrid is being loaded as a result of an UpdatePanel postback. I'm referring to the ASP.NET Ajax Toolkit updatepanel control. Until I swiched the scripts directory from 'ig_common' to the one specified above Ihaven't had any problems with the WebGrid scripts loading.

And this is where I run out of ideas....

Any help greatly apreciated! 

Parents
No Data
Reply
  • 28464
    posted

    Hello Emil,

    Thanks for writing and for the detailed information you have given. I am currently trying to reproduce the problem (I assume the grid is initially invisible and then it gets visible in a certain situation. The grid is placed inside the ContentTemplate of an asp:UpdatePanel).

    While I still have not been able to reproduce that (I keep trying), I do have one suggestion. Is it possible, that the ASPX page hosting the grid (or the user-control / master-page, etc) is not directly in the root of the application? In this case the javaScriptDirectory setting will be relative to the ASPX page and not relative to the root, hence the possible failure to load the scripts (if JS is directly in the root)

    Maybe you can try the tilde slash syntax "~/JS/NetAdvantage..." to specify the locations? Will this help?

    Meanwhile I keep trying to reproduce the issue, so I can figure out what is going on.

    Please, let me know if this helps. 

Children