IIS 7 no work script

2 posts, 0 answers
  1. Denis
    Denis avatar
    9 posts
    Member since:
    Mar 2014

    Posted 07 Mar 2014 Link to this post


    Сopy project folder in IIS 7.5. But when I run, not one script does not work.

    for example

    protected void ShowWindowS()
            string script = "function f(){$find(\"" + rdWindowSup.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);

    protected void rdButtonRN_Click(object sender, EventArgs e)

    Run in Visual Studio 2012  all works.

    I do not know what to do.

    what settings you need to do to work scripts? IIS 7.5

  2. Marin Bratanov
    Marin Bratanov avatar
    3907 posts

    Posted 11 Mar 2014 Link to this post

    Hello Denis,

    If you are using the built-in Cassini server, moving to IIS7+ may require some additional HTTP handlers in the web.config so that all necessary scripts on the page can be downloaded and executed: http://www.telerik.com/help/aspnet-ajax/introduction-registering-the-httphandlers-on-windows-vista-iis-7-integrated-mode.html.

    For your convenience I am attaching here a very simple web.config file with our handlers in it, so you can compare it with yours and add any that you need, but are missing.

    You can easily confirm if this is the problem by monitoring the browser console - if during the page load you encounter JavaScript errors like "Telerik is undefined", then most likely, the webresource requests fail because of missing handlers, and all scripts on the page are missing/broken.

    If this is not your case I would advise examining the following two articles to see if they help:
    - http://www.telerik.com/help/aspnet-ajax/introduction-troubleshooting.html - especially the section that treats location tags that allow the users access to the webresource handlers
    - http://www.telerik.com/help/aspnet-ajax/introduction-web-resources-troubleshooting.html - on other issues with webresources
    - http://www.telerik.com/help/aspnet-ajax/scriptmanager-cdn-support.html - on using the CDN to get our built-in scripts from the cloud, instead of from the server. This should make sure they are present on the page, so no errors are thrown and custom scripts should then work.

    If neither helps, I would advise opening a ticket where you can send us a project that we can run and see the problem, so that we can offer a concrete advice.

    Marin Bratanov

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Back to Top