Where do I put the RadScriptManager or ScriptManager

18 posts, 0 answers
  1. R2
    R2 avatar
    63 posts
    Member since:
    Sep 2007

    Posted 10 Dec 2008 Link to this post

    Hello,

    On page 25, section 1.6, it states:

    "RadControls for ASP.NET AJAX requires a ScriptManager before any of the controls on the page. You may instead use the RadScriptManager although it is not required. RadScriptManager has some optimization capabilities that can be used for maximum performance."

     

    I ran the first application from the Training Guide (PDF page 34), and I am getting the below error about the web.config file and using the SmartTag to configure this control as well as the RadScriptManager control:

    '~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager

    Where does this control belong on the page and how do I fix the web.config so that this lesson can run in the browser correctly?

    Thanks,
    R2

     

  2. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 11 Dec 2008 Link to this post

    Hello,

    You should register the httphandler as it's shown in the documentation:
    RadScriptManager

    Let us know if you need further assistance.

    Best regards,
    Daniel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. R2
    R2 avatar
    63 posts
    Member since:
    Sep 2007

    Posted 11 Dec 2008 Link to this post

    Thanks.  I went ahead and re-did the lesson, adding the RadScriptManager at the very beginning in the Content div.  At that point, I used the SmartTag to register.  It worked perfectly.


    Thanks,
    R2

     

     

     

  5. balaji
    balaji avatar
    69 posts
    Member since:
    May 2009

    Posted 02 Jun 2009 Link to this post

    Hey Guys
    I have Tried the Above Steps but now am getting some other error
    Format of the initialization string does not conform to specification starting at index 0.

    My Web.config looks like this



    <?xml version="1.0"?>
    <!--
        Note: As an alternative to hand editing this file you can use the
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in
        machine.config.comments usually located in
        \Windows\Microsoft.Net\Framework\v2.x\Config
    -->
    <configuration>
        <configSections>
            <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                        <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                        <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    </sectionGroup>
                </sectionGroup>
            </sectionGroup>
        </configSections>
        <appSettings/>
        <connectionStrings/>
        <system.web>
            <!--
                Set compilation debug="true" to insert debugging
                symbols into the compiled page. Because this
                affects performance, set this value to true only
                during development.
            -->
            <compilation debug="true">
                <assemblies>
                    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                </assemblies>
            </compilation>
            <!--
                The <authentication> section enables configuration
                of the security authentication mode used by
                ASP.NET to identify an incoming user.
            -->
            <authentication mode="Windows"/>
            <!--
                The <customErrors> section enables configuration
                of what to do if/when an unhandled error occurs
                during the execution of a request. Specifically,
                it enables developers to configure html error pages
                to be displayed in place of a error stack trace.

            <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
            -->
            <pages>
                <controls>
                    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                </controls>
            </pages>
        <httpHandlers>
           <remove path="*.asmx" verb="*" />
           <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
              validate="false" />
           <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
              validate="false" />
           <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
              validate="false" />
           <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1105.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
              validate="false" />
        </httpHandlers>
            <httpModules>
                <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </httpModules>
        </system.web>
        <system.codedom>
            <compilers>
                <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                    <providerOption name="CompilerVersion" value="v3.5"/>
                    <providerOption name="WarnAsError" value="false"/>
                </compiler>
                <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                    <providerOption name="CompilerVersion" value="v3.5"/>
                    <providerOption name="OptionInfer" value="true"/>
                    <providerOption name="WarnAsError" value="false"/>
                </compiler>
            </compilers>
        </system.codedom>
        <!--
            The system.webServer section is required for running ASP.NET AJAX under Internet
            Information Services 7.0.  It is not necessary for previous version of IIS.
        -->
        <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
            <modules>
                <remove name="ScriptModule"/>
                <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </modules>
            <handlers>
                <remove name="WebServiceHandlerFactory-Integrated"/>
                <remove name="ScriptHandlerFactory"/>
                <remove name="ScriptHandlerFactoryAppServices"/>
                <remove name="ScriptResource"/>
                <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </handlers>
        </system.webServer>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <dependentAssembly>
                    <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
                </dependentAssembly>
                <dependentAssembly>
                    <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
                </dependentAssembly>
            </assemblyBinding>
        </runtime>
    </configuration>

    Plz help
    Thanks
    Regards
    N.Balaji




  6. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 05 Jun 2009 Link to this post

    Hello balaji,

    This error is most commonly related to the connection strings. I recommend you search in Google for more information:
    Format of the initialization string...

    Best regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Scott McNeany
    Scott McNeany avatar
    9 posts
    Member since:
    Mar 2010

    Posted 30 Jul 2010 Link to this post

    I am getting the below error when wrapping my <system.webServer> section with a
    <location path="." inheritInChildApplications="false"> . I did this because I have a Sitefinity site at the root with a non-Sitefinity site in a virtual directory below it. I don't want my sub-application inheriting the configuration, because it doesn't have the necessary DLLs to interpret the handler declarations. When I remove the 'location' tag, my root application works just fine, but my sub-application breaks because of the inherited handlers.

    "RadControls for ASP.NET AJAX requires a ScriptManager before any of the controls on the page. You may instead use the RadScriptManager although it is not required. RadScriptManager has some optimization capabilities that can be used for maximum performance."

     Please advise. Thank you,

    Scott McNeany
  8. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 02 Aug 2010 Link to this post

    Hello Scott,

    Please excuse me if I have not understood your scenario correctly, however from your description I assume that using this location tag is what you would like to do and with it your application works as expected. Am I missing something from your logic? Let me know, also see the replies about this exception further down in this thread.

    Kind regards,
    Sebastian
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Scott McNeany
    Scott McNeany avatar
    9 posts
    Member since:
    Mar 2010

    Posted 02 Aug 2010 Link to this post

    Sebastian,

    Thank you for your help. Basically, Application A (Sitefinity site at the root of the IIS 7 site) works correctly WITHOUT the location tag in its web.config file. The error I get when I add the location tag is what I posted in my previous comment.

    However, Application B (non-SF site as a sub-application) only works WITH the location tag in place, because it does not have the DLLs necessary to understand the handlers.

    I DO want to have the location tag in place, because it keeps Application B separate from anything I configure at the root.

    Thank you,

    Scott McNeany
  10. Scott McNeany
    Scott McNeany avatar
    9 posts
    Member since:
    Mar 2010

    Posted 02 Aug 2010 Link to this post

    Sorry, the error I get is below.

    ~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager
  11. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 02 Aug 2010 Link to this post

    Hi Scott,

    This is indeed a strange issue with this configuration (Sitefinity root site and non-Sitefinity sub-site). To research it further I suggest you post a separate thread in our Sitefinity forums or start a formal support ticket providing a simple test case in it. Thus we will do our best to provide up-to-point answer/solution.

    Kind regards,
    Sebastian
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. MD
    MD avatar
    55 posts
    Member since:
    Jul 2012

    Posted 27 Aug 2010 Link to this post

    I'm am now getting this error since adding the location element with the inherirInChildApplications attribute around the system.webServer section to prevent configuration inheritance so that my sub applications do not inherit the module and handler entries from the root since some of my sub applications do not utilize Telerik controls (they would otherwise expect the Telerik dlls in the bin of their application).

    <location inheritInChildApplications="false">
      <system.webServer>
     
        <modules>
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
          <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="managedHandler"/>
        </modules>
     
        <handlers>
          <remove name="WebServiceHandlerFactory-Integrated"/>
          <remove name="ScriptHandlerFactory"/>
          <remove name="ScriptHandlerFactoryAppServices"/>
          <remove name="ScriptResource"/>
          <add name="ScriptResource" path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode"/>
          <add name="ScriptHandlerFactoryAppServices" path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode"/>
          <add name="ScriptHandlerFactory" path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode"/>
          <add name="Telerik.Web.UI.WebResource" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode"/>
        </handlers>
     
      </system.webServer>

    Was there any further investigation into what was causing this.  Below are a few links describing the desired affect in regards to the inheritInChildApplications attribute.

    http://west-wind.com/weblog/posts/133041.aspx

    http://blogs.msdn.com/b/irenak/archive/2006/06/27/648402.aspx
  13. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 27 Aug 2010 Link to this post

    Hello MD,

    The best option would be to contact our Sitefinity team via their forum or the support ticket system. They will provide further insight on the matter.

    Best regards,
    Sebastian
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. MD
    MD avatar
    55 posts
    Member since:
    Jul 2012

    Posted 27 Aug 2010 Link to this post

    I don't use Sitefinity, but I do use ASP.NET AJAX controls in my root site were the web.config with the location and inheritInChildApplication settings.  This is not a sitefinity issue, but what appears to be how you determine if the handler definition exists.
  15. MD
    MD avatar
    55 posts
    Member since:
    Jul 2012

    Posted 27 Aug 2010 Link to this post

    If I disable the handler detection via the EnableHandlerDetection property of the RadScriptManager and RadStyleSheetManager I experience no problems since. 

    I just came across a section in your documentation after troubleshooting that describes the issues and recommends this as the resolution.  http://www.telerik.com/help/aspnet-ajax/troubleshooting-radscriptmanager.html.  I haven't had a chance to look at your source, but could you take a look at the code that determines if the handler exists so that it might be modified to account for this situation and negating the need for disabling the handler detection on every script manager and stylesheet manager.

    Thanks
  16. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 30 Aug 2010 Link to this post

    Hi,

    I'm glad you've managed to get around the problem. I can confirm that the handler detection will indeed cause errors in some scenarios. This should be completely solved in the current version of the controls.

    Apologies for the caused inconvenience.

    Best wishes,
    Tsvetomir Tsonev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  17. Shyni
    Shyni avatar
    1 posts
    Member since:
    Mar 2011

    Posted 30 Mar 2011 Link to this post

    I need to use the RAD controls in a razor view for MVC3. How do I register the RadScriptManager?
  18. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 04 Apr 2011 Link to this post

    Hi Shyni,

    RadControls for ASP.NET AJAX are supported in MVC 3 WebForms views only. Therefore, if you intend to use them you will need to host the controls in WebForms views of your MVC 3 projects.

    We do recommend using our native MVC extensions in Razor views as they fully support them.

    Best regards,
    Sebastian
    the Telerik team
  19. John
    John avatar
    36 posts
    Member since:
    Oct 2006

    Posted 02 Oct 2011 Link to this post

    Hi Shyni

    I have been using MVC3 Razor for several months now and deifnte convert.

    I recently went back to an old MVC2 project and have upgraded it to MVC3 and converted one of the pages to Razor using the Telerik convertor and discovered the issue the ASP.Net Ajax control do not migrate to Razor.  I was wondering that since your post on April if a workaround has been found.

    I tried the following before I went looking and found this post.

    The things i tried were the following as to create a Parial page as an asmx but it did not have the desired effect, the code was created but the .axd was not included.  Is there soemthing i can do or should i go back to .aspx for this and othere affected pages.

    The following is at the top of the page much the same place as in original aspx page.
    @{ Html.RenderPartial("RadWindow"); }

    The folloiwing is the code for the partial view RadWindow.ascx

    <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
     
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
     
        <telerik:RadScriptManager ID="ScriptManager1" runat="server"
            EnableTheming="True">
        </telerik:RadScriptManager>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <Shortcuts>
                <telerik:WindowShortcut CommandName="MaximizeAll" Shortcut="Alt+F3" />
                <telerik:WindowShortcut CommandName="Tile" Shortcut="Alt+F6" />
                <telerik:WindowShortcut CommandName="CloseAll" Shortcut="Esc" />
            </Shortcuts>
            <Windows>
               <telerik:RadWindow
                   ID="RadWindowPopup"
                   runat="server"
                   Modal="True" ShowContentDuringLoad="False" AutoSize="False" Animation="Fade" Width="900" Height="700" ReloadOnShow="True">
               </telerik:RadWindow>
               <telerik:RadWindow
                   ID="RadWindowPopupModeless"
                   runat="server"
                   Modal="False" ShowContentDuringLoad="False" AutoSize="False" Animation="Fade" Width="900" Height="700" ReloadOnShow="True">
               </telerik:RadWindow>
           </Windows>
        </telerik:RadWindowManager>

    Thanks

    John

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017