RadScriptManager error to load WebUIValidation.js

4 posts, 0 answers
  1. Hooberth
    Hooberth avatar
    2 posts
    Member since:
    Jun 2010

    Posted 03 May 2017 Link to this post

    RadScriptManager is trying to load WebUIValidation from an address that does not exist.

    I have two scenarios:

    1 - When the RadScriptManager is configure like below [0] the script tag [1] is generated which try to load the script from an unexistent place.

    [0] -

        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="500"
            ScriptPath="~" ScriptMode="Release">
            <Scripts>
                  .... custom scripts ...
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>

    [1] - 

    <script src="System.Web/4.0.0.0/4.6.1637.0/WebUIValidation.js" type="text/javascript"></script>

     

    2 - When the  RadScriptManager is configure like below [2] there is no error to load the script, however the error happens when a content is loaded via Ajax using the RadAjaxManagerProxy at this time it's triggered by an internal call of Telerik.Web.UI.WebResource.axd.

     

        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="500"
            EnablePageMethods="true" ScriptPath="~" ScriptMode="Release" >
            <Scripts>
                .... custom scripts ...
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                <asp:ScriptReference Assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Path="~/js/WebUIValidation.js" Name="WebUIValidation.js" />
            </Scripts>
        </telerik:RadScriptManager>

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5323 posts

    Posted 05 May 2017 Link to this post

    Hi,

    I have answered your support ticket with this question and I am pasting my reply here for anyone else with a similar issue.


    With .NET 4.5 the default mode for validation is Unobtrusive Validation and that plugs into webresource resolution and changes the jquery and validation scripts.

    The following article explains how to get that working (basically, you need to add a nuget package with those files and reference them from the file system in the script manager): http://docs.telerik.com/devtools/aspnet-ajax/general-information/troubleshooting/jquery-troubleshooting.

    You can also try disabling the unobtrusive validation to see if this helps:

    <appSettings>
        <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
    </appSettings>

    I must also note that we do not have control over this, it is up to the framework to resolve and register these scripts. 


    Regards,
    Marin Bratanov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Hooberth
    Hooberth avatar
    2 posts
    Member since:
    Jun 2010

    Posted 05 May 2017 in reply to Marin Bratanov Link to this post

    Hi Marin, thanks for your reply. We've already tested that and the problem still, we also tried to set that on application_star.

    Do you have any other reference that could help?

  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5323 posts

    Posted 08 May 2017 Link to this post

    Hi,

    There are several things you can try:

    • ensure the Unobtrusive validation mode is disabled
    • ensure the necessary scripts that the framework is looking for are present in the solution as files
    • ensure the setup works with the standard asp:ScriptManager
    • try using the CDNs we offer (<telerik:RadScriptManager ID="ScriptManager1" runat="server" CdnSettings-TelerikCdn="Enabled">) and also the MS AJAX CDN (<telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableCdn="true">) so there are no WebResource requests for scripts 

    Regards,
    Marin Bratanov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top