ServerZoo虛擬主機使用教學文件區 Home      會員列表      Register Now!
舊 2013-03-15, 10:26 PM   #1
Tech-SZ 的頭像
 
Tech-SZ
最高權限

預設 ASP.NET Ajax client-side framework failed to load

您好
Ajax ServerZoo ASP虛擬主機有支援,但如果您需要AJAX 然後出現這些錯誤:
ASP.NET Ajax client-side framework failed to load

如果您網站需要classic integrated code handler,請加這些到您web.config 下的system.webserver單元

代碼:
<handlers>
<add name="ScriptVerb" verb="*"  path="*.asmx" preCondition="integratedMode"  type="System.Web.Script.Services.ScriptVerb, System.Web.Extensions,  Version=4.0.0.0, Culture=neutral"/>
<add  name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd"  preCondition="integratedMode"  type="System.Web.Script.Services.ScriptHandlerFactory,  System.Web.Extensions, Version=4.0.0.0, Culture=neutral"/>
<add  name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD"  path="ScriptResource.axd"  type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,  Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
如果您沒有使用Classic mode,請參考此web.config範例 (請根據自己需求變更)
http://forums.asp.net/t/1243449.aspx#2291128

代碼:
<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><connectionStrings>
                <add name="NORTHWNDConnectionString" connectionString="Data Source=ServerName;Initial Catalog=NORTHWND;Integrated Security=True" providerName="System.Data.SqlClient"/>
                <add name="SIMPLELISTSConnectionString" connectionString="Data Source=(local);Initial Catalog=SIMPLELISTS;Integrated Security=True" providerName="System.Data.SqlClient"/>
        </connectionStrings>
        <system.web>
                <authentication mode="Forms"></authentication>
                <pages theme="Simple">
                        <controls>
                                <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
                                <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>
                <!--
          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="true">
                        <assemblies>
                                <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.Core, 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.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                                <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>
                </compilation>
                <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" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></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.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" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></handlers></system.webServer>
        <system.codedom>
                <compilers>
                        <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
                                <providerOption name="CompilerVersion" value="v3.5"/>
                                <providerOption name="WarnAsError" value="false"/></compiler>
                        <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
                                <providerOption name="CompilerVersion" value="v3.5"/>
                                <providerOption name="OptionInfer" value="true"/>
                                <providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom>
        <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>

此篇文章於 2013-04-15 05:21 PM 被 Sales-SZ 編輯。.
Show SignatureDisplay Signature 回覆時引用此篇文章
舊 2013-04-15, 05:21 PM   #2
Sales-SZ 的頭像
 
Sales-SZ
論壇管理員

預設

※如果還是不行,把以下
代碼:
<add assembly="AjaxControlToolkit, Version=4.1.60919.0,   Culture=neutral,   PublicKeyToken=28f01b0e84b6d53e"/>
加到web.config 的 <assemblies> 單元試試看
回覆時引用此篇文章
回覆

書籤

主題工具
顯示模式

發文規則
不可以發表新主題
不可以發表回覆
不可以上傳附件
不可以編輯自己的文章

啟用 BB 代碼
論壇啟用 表情符號
論壇啟用 [IMG] 代碼
論壇禁用 HTML 代碼

論壇跳轉


所有時間均為台北時間。現在的時間是 11:33 PM


Powered by vBulletin® 版本 3.8.0
版權所有 ©2000 - 2018,Jelsoft Enterprises Ltd.