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

'Sys' is undefined - revisited

6 Answers 146 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 12 Feb 2009, 02:27 AM
Sorry, I accidentally placed this post in the wrong area before this. Feel free to remove my other post... It's one of those days...

--- Post starts here ---

I know, there's like twenty of these threads already, but I'm losing my mind and I'm about to put my keyboard through my monitor... I've built a small application using Telerik's menu, gridview, and the ASP AJAX Controls MediaPlayer control. Everything worked fine with it until I tried to put it onto the server. It played fine locally (until I had to modify the config), and it still plays fine on the intranet where I developed this. I am getting these two errors:

'Sys' is undefined
'Telerik' is undefined

I have attached my web.config file. I can't find anything. Probably because I'm new to ASP.NET development (but not to programming). If you can find anything that might fix this, please, help me... This is so discouraging as the program is ready for launch as version 1...

I'm really irritated. Sorry...

---
Web Config
---

<?xml

version="1.0"?>

 

<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 />

 

 

 

<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="false">

 

<assemblies>

<add

 

assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<add

 

assembly="System.Data.DataSetExtensions, 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.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<add

 

assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<add

 

assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<add

 

assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

</assemblies>

</compilation>

<!--

 

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

 

-->

 

<authentication

 

mode="None" />

 

<customErrors

 

mode="Off">

 

</customErrors>

<!--

 

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

 

enableEventValidation="false">

 

<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

 

verb="*" path="*.asmx" />

 

<add

 

verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<add

 

verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<add

 

verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />

 

<add

 

path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" 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>

</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" />

 

<add

 

name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />

 

</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>

6 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 12 Feb 2009, 08:35 AM
Hello David,

Receiving those errors means that you have some problem with web resource registration. Please check this blog post for troubleshooting instructions.

All the best,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David
Top achievements
Rank 1
answered on 17 Feb 2009, 01:57 AM
I have checked this blog and everything seems to be correct. I even downloaded Fiddler, and I am getting a 404 error on this call:

/tv/Telerik.Web.UI.WebResource.axd

However, I have the httphandlers set up as so:

<add

verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />

 

<add

path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />

 


I have checked IIS and everything seems to be configured correctly.

I am running this application on both the intranet and on the internet. It works PERFECTLY on the intranet. It breaks on the intranet. Two different servers. I am going around in circles, wasting so much time. I have checked and double-checked and triple-checked everything in this blog entry and other links all over google, but nothing works...

Stupidest thing in the world because the application is built and it runs perfectly on the intranet...

Here is the web.config one more time if you care to take a look. PLEASE don't just post another link. I've googled the hell out of this for three days now...

<?xml

version="1.0"?>

 

<!--

Intranet -->

 

<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>

<!-- removed -->

 

</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="false">

 

<assemblies>

<add

assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<add

assembly="System.Data.DataSetExtensions, 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.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<add

assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

<add

assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

 

<add

assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

 

</assemblies>

</compilation>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

 

-->

 

<authentication

mode="Windows" />

 

<customErrors

mode="Off">

 

</customErrors>

<!--

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

enableEventValidation="false">

 

<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

verb="*" path="*.asmx" />

 

<add

verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<add

verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

 

<add

verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />

 

<add

path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" 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>

</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>



0
David
Top achievements
Rank 1
answered on 17 Feb 2009, 02:49 AM
On second thought...

I'm thinking this is something on the server side. I can't think of any other explanation. IDENTICAL CODE runs perfectly on the intranet server but fails on the internet server. Both have .axd set up with "verify file exists" unchecked. Is there anything else that could cause the Telerik.Web.UI.WebResource.axd to return a 404 page not found? Why would it work on one server and not the other?
0
David
Top achievements
Rank 1
answered on 17 Feb 2009, 05:38 AM
Ok, I think I found the problem. It's nothing you could have found, and it was server-side as I thought...

Rejected-By-Urlscan

The problem is that the Telerik.Web.UI.WebResource.axd is being rejected by Urlscan.

I will talk to the networking people and hopefully fixing this will fix the problem.

I hope this post will save someone a few hours...
0
Paul
Telerik team
answered on 17 Feb 2009, 07:32 AM
Hello David,

We are glad that you were able to solve the problem yourself and apologize that we could not help you right away.
Don't hesitate to contact us if you have other questions.

Greetings,
Paul
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.
0
David
Top achievements
Rank 1
answered on 17 Feb 2009, 11:13 PM
No problem, Paul. I love the controls.

Urlscan blocked Telerik.Web.UI.Webresource.axd because there was a script embedded into the query string. It might be a good idea for Telerik to write some documentation about this as this was quite the pain to figure out... Now I know to check the web logs sooner rather than later. I cut and cut and cut away at my code but nothing would get fixed. If I had just checked the server logs and then the Urlscan logs, I could have figured this out in minutes...

I think I only saw one other person even mention urlscan with regards to Webresource, so it might be worth documenting. :) Hopefully, my anguish saves someone else time.
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
David
Top achievements
Rank 1
Paul
Telerik team
Share this question
or