in

didierdanse.net

Site personnel de Didier Danse
Didier Danse's Personnal Website
Microsoft Most Valuable Professional SharePoint

This Blog

Syndication

didierdanse.net - Les news Developpement

ASP.NET AJAX 1.0: Sys is undefined, pourquoi et comment le corriger?

Certes, c'est loin d'être un problème récent mais étant récemment retombé sur le problème, je me décide enfin à écrire la solution... Je sais que cela servira au moins à une personne :-)

Après avoir installé les extensions ASP.NET AJAX 1.0 sur un poste dans le but de réaliser des développements avec Visual Studio 2008, on pourrait s'attendre à trouver le template de projet "ASP.NET AJAX Enabled Web Application". Il n'en est pourtant rien comme en atteste la capture d'écran suivante:

image

Puisque nous n'avons guère le choix, choisissons le template ASP.NET Web Application. Rapidement, nous pouvons remarquer que les composants "de base" de ASP.NET AJAX Extensions sont bel et bien présents dans la toolbox. Parfait!

image

Il ne nous reste donc plus à les utiliser à l'aide d'un drag and drop, tout ce qu'il y a de plus classique.

Si on observe le web.config (le plus simple étant de garder le web.config ouvert dans Visual Studio, vous serez immédiatement averti des changements), on peut voir que quelques lignes ont été ajoutées dans le web.config:

<assemblies>
                <add assembly="System.Web.Extensions, Version=1.0.61025.0, 
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </assemblies>

Dès lors, on pourrait se dire que tout va bien et que Visual Studio a fait le travail pour nous. Mais après exécuté la page, l'erreur 'Sys' is undefined apparaît dans le browser.

Pourquoi? La réponse est simple... On retrouve

<script src="/ScriptResource.axd?d=xyz" type="text/javascript"></script>
<script src="/ScriptResource.axd?d=abc" type="text/javascript"></script>

dans la source HTML. Or si on vérifie ce que génére ce fichier, on remarque que celui-ci n'est pas disponible. Cela est dû au fait que le serveur ne sait pas comment interpréter les .axd. C'est pour cela qu'il est nécessaire d'ajouter les lignes suivantes dans le web.config et ce entre <system.web> et </system.web>:

<httpHandlers>
  <add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler"
validate="false"/> </httpHandlers>

Désormais, il ne nous reste plus qu'à laisser exploser notre imagination.

Le web.config minimal:

<?xml version="1.0"?>
<configuration>
    <appSettings/>
    <connectionStrings/>
    <system.web>
    <httpHandlers>
      <add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler"
validate="false"/> </httpHandlers> <compilation debug="false"> <assemblies> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </assemblies> </compilation> <authentication mode="Windows"/> </system.web> </configuration>

Notez que vous pouvez trouver un web.config complet à l'adresse suivante:

C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025.

Comments

 

Antoine Emond said:

Pratique cet article... Il va servir à plus d'un, c'est clair ;)

September 2, 2008 1:10 PM
 

Olvani said:

D

September 12, 2008 4:11 PM
 

Samuel Giroux said:

Woooo! Fallait le savoir, je vais essayer tout de suite. Et moi qui pensait que Microsoft Internet Explorer 7 ne supportait même pas les technologies propres à Microsoft!

November 18, 2008 8:48 AM
 

openjl said:

Super merci, nickel la solution après avoir cherché et sué très fort par ailleurs!

March 4, 2010 3:33 PM
 

Alessandri Olivier » Blog Archive » Développement Ajax.Net : Sys is undefined said:

Pingback from  Alessandri Olivier  &raquo; Blog Archive   &raquo; D&eacute;veloppement Ajax.Net : Sys is undefined

April 29, 2011 1:29 PM
 

amzhq said:

Fulfilling our needs for fast fashion means increased production and competition in clothing manufactured in countries with fashion trend.In order to meet the market's demands,<a href="www.usa--store4coach.com/"><strong>Coach Outlet Store Online</strong></a> pay more attention on the fashion style with the latest material.In terms of luxury consumption, consumers in Western countries prefer traditional brands while consumers in China are wilder about the fashionable fad.In <a href="www.usa--store4coach.com/"><strong>Coach Outlet</strong></a> there are many famous bags of the Coach Brand.In USA,at least,each of the person have a Coach bags on the average.So,in the Amercian market,Coach bags get the people favourate.On that basic,manufacture take the chance to make the price very on the high side.Today,<a href="www.usa--store4coach.com/"><strong>Coach Handbags Outlet USA</strong></a> do atmost to drop the price,with the same quality.In order to thanks for the public,Coach give a biggest discount to Forengn for the fastival.If U bag bags over $99,<a href="www.usa--store4coach.com/"><strong>Coach Outlet Store Online</strong></a> can send the goods to Ur home without the fright.At the same time,the goods of coach bags can have a discount at 82% to meet the market's needs.So don't worry,Coach bags can give U the chance to owned your remembered bags with very lowest price.At the same time,<a href="www.usa--store4coach.com/"><strong>Coach Outlet Store Online</strong></a> newly iaunched the latest fad bags which canused a ensation in the fashion world for U to make up in the winter.Is your heat moving very fast,quick, first come first get.More and More chance are waiting for U.

February 21, 2012 6:15 AM
 

Coach Purses Outlet said:

Welcome to buy <a href="http://www.cheapcoachpursessale.com"><strong>Cheap Coach Purses</strong></a> for sale online if you want to get the best price for your dream coach on <a href="http://www.coachpursesoutletsonlines.com"><strong>Coach Purses Outlet</strong></a>.<a href="http://www.coachonlinesoutlets.com"><strong>Coach Online Outlet</strong></a> have various types for your choices in <a href="http://www.coachpursesfree.com"><strong>Coach Purses Outlet</strong></a>, you'll find selections to meet any budget from <a href="http://www.coachonlinesoutlets.com"><strong>Coach Outlet Online</strong></a>. Here are some detailed of discount <a href="http://www.coachonlinesoutlets.com"><strong>Coach Online Sale</strong></a>.Elegant and noble will be the distinctive characteristic of authentic <a href="http://www.coachonlinesoutlets.com"><strong>Coach Outlet</strong></a> on sale 2012 at discount coach online store. The absolutely excellent craftsmanship and worldwide top level make discount <a href="http://www.coachpursesfree.com"><strong>Coach Purses Outlet Store</strong></a> for sale online comfort and durability. The <a href="http://www.coachsonlinesoutlet.com"><strong>Coach Outlet</strong></a> have quite a few fans around the world for many years, mainly because these <a href="http://www.coachpursesoutletsonlines.com"><strong>Coach Outlet</strong></a> have a wide selection of colors, sizes and styles, earning him a solid reputation. The favorite price of <a href="http://www.cheapcoachpursessale.com"><strong>Coach Purses Outlet</strong></a> with the durability, fancy styles and refined handwork give you ultimate comfort and fashion. Besides, the op art patters with unique figure captions, modern silver metal on the surface, authentic fabric lining and so on make them quite durability and practicality. So <a href="http://www.coachpursesoutletsonlines.com"><strong>Coach Purses</strong></a> on sale are very convenient for daily life which can be worn either by your side or tucked under your arm. Everyone does want to have this style of <a href="http://www.coachpursesfree.com"><strong>Coach Outlet Store</strong></a> because of its unique design on <a href="http://www.cheapcoachpursessale.com"><strong>Coach Purses Sale</strong></a>. Buy <a href="http://www.coachonlinesoutlets.com"><strong>Coach Online</strong></a> now and enjoy the fashion world now.Shop <a href="http://www.coachsonlinesoutlet.com"><strong>Coach Outlet Store</strong></a> with free shipping!

April 10, 2012 5:46 AM
 

Carlos Pena Jersey said:

http://www.raysfanstore.com/evan-longoria-jersey">www.raysfanstore.com/evan-longoria-jersey    Evan Longoria Jersey

http://www.raysfanstore.com/carlos-pena-jersey">www.raysfanstore.com/carlos-pena-jersey    Carlos Pena Jersey

http://www.raysfanstore.com/david-price-jersey">www.raysfanstore.com/david-price-jersey    David Price Jersey

http://www.raysfanstore.com  Rays Jerseys

http://www.raysfanstore.com/sam-fuld-jersey    Sam Fuld Jersey

http://www.raysfanstore.com/wade-davis-jersey   Wade Davis Jersey

http://www.raysfanstore.com/rafael-soriano-jersey  Rafael Soriano Jersey

http://www.raysfanstore.com/scott-kazmir-jersey    Scott Kazmir Jersey

http://www.raysfanstore.com/john-jaso-jersey     John Jaso Jersey

http://www.raysfanstore.com/carl-crawford-jersey         Carl Crawford Jersey

http://www.raysfanstore.com/jeff-niemann-jersey   Jeff Niemann Jersey

http://www.raysfanstore.com/jake-mcgee-jersey     Jake McGee Jersey

http://www.raysfanstore.com/matt-joyce-jersey     Matt Joyce Jersey

June 14, 2012 4:36 AM
 

Carlos Pena Jersey said:

http://www.raysfanstore.com/evan-longoria-jersey">www.raysfanstore.com/evan-longoria-jersey    Evan Longoria Jersey

http://www.raysfanstore.com/carlos-pena-jersey">www.raysfanstore.com/carlos-pena-jersey    Carlos Pena Jersey

http://www.raysfanstore.com/david-price-jersey">www.raysfanstore.com/david-price-jersey    David Price Jersey

http://www.raysfanstore.com  Rays Jerseys

http://www.raysfanstore.com/sam-fuld-jersey    Sam Fuld Jersey

http://www.raysfanstore.com/wade-davis-jersey   Wade Davis Jersey

http://www.raysfanstore.com/rafael-soriano-jersey  Rafael Soriano Jersey

http://www.raysfanstore.com/scott-kazmir-jersey    Scott Kazmir Jersey

http://www.raysfanstore.com/john-jaso-jersey     John Jaso Jersey

http://www.raysfanstore.com/carl-crawford-jersey         Carl Crawford Jersey

http://www.raysfanstore.com/jeff-niemann-jersey   Jeff Niemann Jersey

http://www.raysfanstore.com/jake-mcgee-jersey     Jake McGee Jersey

http://www.raysfanstore.com/matt-joyce-jersey     Matt Joyce Jersey

June 14, 2012 4:36 AM
 

replica rolex said:

www.watchesbrilliant.com

www.watchesbrilliant.comcategories/Swiss-Movement/

www.watchesbrilliant.comcategories/Swiss-Movement/ETA-3156/

www.watchesbrilliant.comcategories/Automatic-Movement/

http://www.hulu-tiffany.com/

http://www.hulu-tiffany.com/tiffany-pendants.html

http://www.hulu-tiffany.com/tiffany-key-rings/tiffany-co-key-chains-t-jewelry-chains-020.html

http://www.hulu-tiffany.com/tiffany-necklaces/925-sterling-black-oynx-toggle-necklace.html

http://www.well-watches.com

http://www.tiffany-cool.com

http://www.tiffany-cool.com/tiffany-silver-pendants.html

http://www.tiffany-cool.com/tiffany-silver-rings.htm

http://www.tiffany-cool.com/tiffany-silver-pendants/tiffany-key-trefoil-key-pendant

http://www.tiffany-cool.com/tiffany-silver-bangles.html

www.elegant-tiffany.com

http://www.only-tiffany.com/

http://www.tiffanyforyou.com/

http://www.watchesgreat.com

http://www.watchesgreat.com/rolex-c-96.html

http://www.watchesgreat.com/tag-heuer-c-97.html

http://www.watchesgreat.com/rolex-datejust-18k-yellow-gold-plated-stainless-steel-diamond-plated-id-1770.html

http://www.all-us-watches.com

ww.all-us-watches.com/.../Rolex

http://www.all-us-watches.com/brands/Swiss-movement.html

http://www.all-us-watches.com/products/DateJust-Replica-Rolex-Two-Tone-25mm-Lady%27s-Gold-Dial-Diamond-Numerals-RM%252d592.html

http://www.watches-nice.com

http://www.watches-nice.com/categories/Rolex-watches/

http://www.watches-nice.com/categories/Breitling-watches/

http://www.watches-nice.com/products/Cartier-Replica-watches-%5BRM%252d2808%5D.html

www.tiffany-outstanding.com

www.temperament-tiffany.com

http://www.tiffany-shiny.com

June 19, 2012 1:54 AM

Leave a Comment

(required)  
(optional)
(required)  
Add
L'auteur du site ne peut être tenu responsable des dommages que les informations fournies pourraient entraîner. Tout est cependant mis en oeuvre pour éviter tout désagrément.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems