W większości przypadków gdy witryna generuje błąd "'Sys' is undefined" mamy do czynienia z niepełnym plikiem web.config. Poniżej podajemy sekcje pliku konfiguracyjnego, które powinny ten problem usunąć.
oraz
<
system.web
>
...
<
httpHandlers
>
<
remove
verb
=
"*"
path
=
"*.asmx"
/>
<
add
verb
=
"*"
path
=
"*.asmx"
validate
=
"false"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
<
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"
/>
<
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"
/>
</
httpHandlers
>
<
httpModules
>
<
add
name
=
"ScriptModule"
type
=
"System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
</
httpModules
>
...
<
system.web
>
oraz
<
system.webServer
>
...
<
validation
validateIntegratedModeConfiguration
=
"false"
/>
<
modules
>
<
add
name
=
"ScriptModule"
preCondition
=
"integratedMode"
type
=
"System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
</
modules
>
<
handlers
>
<
remove
name
=
"WebServiceHandlerFactory-Integrated"
/>
<
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"
/>
<
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"
/>
<
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"
/>
</
handlers
>
...
</
system.webServer
>