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

Application keeps getting "Sys is undefined"

1 Answer 206 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Hanan
Top achievements
Rank 1
Hanan asked on 16 Dec 2009, 08:45 AM

hey guys,

i have gone through many articles suggesting many solutions, the best one which worked for me on the development enviroment but not on the production is to replace the RadScripManager with the ScriptManager, no script errors appeared any longer but this runied other parts in the content paga, by the way i HAVE A ONE Master page and i put the scriptManager there,

what is ruined from remioving the RadScript and putting the scriptManger:
I have got some many script errors like:

1) Sys.InvalidOperationException: Type Telerik.Web.UI.Orientation has already been registered

 

 The solution suggested by some people:

  <asp:ScriptManager ID="ScriptManager1" runat="server">

        <Scripts>

            <asp:ScriptReference Name="Telerik.Web.UI.Common.Core.js" Assembly="Telerik.Web.UI" />

            <asp:ScriptReference Name="Telerik.Web.UI.Upload.RadUpload.js" Assembly="Telerik.Web.UI" />

        </Scripts>

     </asp:ScriptManager>

 

 

 


2)  Sys.ScriptLoadFailedException: The script '/ScriptResource.axd?d=jJZh4CK_PGSYJ-f57lEgQFzI3N0cQpNuzrmEgrdYC37pG2G4CbZ9dT8joZiZnlVO0&t=633927569740000000' failed to load.

 

The solution suggested by some people:

// fixing Error: Sys.ScriptLoadFailedException: The script <url for script> could not be loaded.

            if( Sys && Sys.Application )

            {

                Sys.Application.notifyScriptLoaded();

            }

           

            if( typeof(Sys) != "undefined" && typeof(Sys.Application) != "undefined" )

            {

                Sys.Application.notifyScriptLoaded();

            }

           


3) Sys.InvalidOperationExceptionSys.InvalidOperationException: A control is already registered with the element.

The solution suggested by some people:

Use RadScriptManager instead of scriptManager, and this solves the problem, but it keeps showing “sys is undefined” on login page, how can I fix all of these errors without ruining anything.


the weird thing that when i put back the radscriptmanager, i didn''t get the third error, but it still keeps getting "sys is undefined"  on the login page, some people said that is due to authorization, i tried what they recommended but nothing is worked for me..

regardign the web.config, it is configured very well, i reviewd every single line ( handlers, modules ... )..
actually i didn't give up figuring out the problem but it is very kind of you of you give your hand in this.


all the best,
hanan

 

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 18 Dec 2009, 01:52 PM
Hello Hanan,

Can we start from the beginning please.
So, you have RadScriptManager on your page and you receive the Sys is not defined message. If you setup everything correctly (you have Ajax on the server, you created an Ajax-enabled web site then you registered the modules and handlers in the web config) and still get that error - it might be caused by the authentication of the page. Probably the .axd file served by RadScriptManager is forbidden for the unauthenticated users (your login page). Have you added this to the web.config?

<configuration>
...
<location path="Telerik.Web.UI.WebResource.axd">
   <system.web>
     <authorization>
       <allow users="*"/>
     </authorization>
   </system.web>
 </location>
...
</configuration>

In addition, you can check the Web Resources Troubleshooting help topic.

Best wishes,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ScriptManager and StyleSheetManager
Asked by
Hanan
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or