solution-Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type ‘Sys._Application’ cannot be converted to type ‘Sys._Application’.

{0 Comments}

If you try to run your application and you are getting the above error continuously that means that, property to use Microsoft asp.net Ajax in web.config file is not configured properly. It is usually seen in visual studio 2008 the web.config file is auto configured but, in visual studio 2005 when this error generally appear then you have to configure this manually. Below are the whole snippets for your web.config file. Modify yours in same manner. Or try to update your .NET version.

 XML |  copy code |? 
001
<configuration>
002
 
003
  <configSections>
004
 
005
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
006
 
007
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
008
 
009
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
010
 
011
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
012
 
013
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
014
 
015
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
016
 
017
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
018
 
019
        </sectionGroup>
020
 
021
      </sectionGroup>
022
 
023
    </sectionGroup>
024
 
025
  </configSections>
026
 
027
  <system.web>
028
 
029
    <pages>
030
 
031
      <controls>
032
 
033
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
034
 
035
      </controls>
036
 
037
    </pages>
038
 
039
    <compilation debug="true">
040
 
041
      <assemblies>
042
 
043
        <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
044
 
045
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
046
 
047
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
048
 
049
      </assemblies>
050
 
051
    </compilation>
052
 
053
    <httpHandlers>
054
 
055
      <remove verb="*" path="*.asmx"/>
056
 
057
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
058
 
059
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
060
 
061
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
062
 
063
    </httpHandlers>
064
 
065
    <httpModules>
066
 
067
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
068
 
069
    </httpModules>
070
 
071
  </system.web>
072
 
073
  <system.web.extensions>
074
 
075
    <scripting>
076
 
077
      <webServices>
078
 
079
      </webServices>
080
 
081
 
082
    </scripting>
083
 
084
  </system.web.extensions>
085
 
086
  <system.webServer>
087
 
088
    <validation validateIntegratedModeConfiguration="false"/>
089
 
090
    <modules>
091
 
092
      <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
093
 
094
    </modules>
095
 
096
    <handlers>
097
 
098
      <remove name="WebServiceHandlerFactory-Integrated"/>
099
 
100
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
101
 
102
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
103
 
104
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
105
 
106
    </handlers>
107
 
108
  </system.webServer>
109
 
110
</configuration>

Another reason which causes this problem is Script mode attribute of script manager is not set to ‘release’. Or you may have multiple Ajax reference to your application only one is enough. 

Leave a Comment

Your email address will not be published.