This is a migrated thread and some comments may be shown as answers.

IIS 7 no work script

1 Answer 106 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Denis
Top achievements
Rank 1
Denis asked on 07 Mar 2014, 08:56 AM
Hello

С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)
    {
        ShowWindowS();
    } 


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

















1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 11 Mar 2014, 11:21 AM
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.


Regards,
Marin Bratanov
Telerik

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

Tags
General Discussions
Asked by
Denis
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or