AJAX做的一个网站发布后出错。

尐孑 2008-12-29 09:16:03
我用AJAX做在一个网站发布后放在别在机器上出错
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 系统找不到指定的文件。 (D:\northqn\web.config line 57)

Source Error:


Line 55: </httpHandlers>
Line 56: <httpModules>
Line 57: <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 58: </httpModules>
Line 59: </system.web>


高手指点一下下了
...全文
159 17 打赏 收藏 转发到动态 举报
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jeremiah 2009-01-08
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 jiang_jiajia10 的回复:]
服务器上安装ajaxtoolkit,从错误上看你缺少两个dll.
System.Web.Extensions.dll
System.Web.Extensions.Design.dll
把他们放到bin里面引用
[/Quote]

Correct.
mengxj85 2008-12-29
  • 打赏
  • 举报
回复
Mark
  • 打赏
  • 举报
回复
基本上,如果网站原本不支持asp.nt ajax,你需要如5楼所说把dll拷贝到bin中(因为服务器的系统GAC全局dll目录中没有嘛)。

如果你是使用正规的网站,基本上你都可以跟客服要求将web服务器升级到.net 3.0。都2008年了,系统管理员至少应该把两年前发布的升级包安装一下吧。我遇到的几个网站,虽然有的确实是系统安装时没有安装.net3.0,但是客服全都可以在1、2天内完成这个升级。问问你所说的“别的机器”为何强悍到拒不升级.net framework。
周公 2008-12-29
  • 打赏
  • 举报
回复
在使用微软Ajax控件库开发Ajax应用部署的时候需要注意一些事项。首先要将安装微软Ajax控件库的安装目录下拷贝System.Web.Extensions.dll、System.Web.Extensions.Design.dll及AJAXExtensionsToolbox.dll到本网站的Bin目录下,默认情况下微软Ajax控件库的安装目录分区为系统分区,例如笔者的系统分区在C盘,这个安装目录为:C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025。其次建议对web.config做一下配置,在微软Ajax控件库的安装目录下有一个web.config文件,里面给出了如何配置的例子。也就是在创建asp.net项目时默认添加的web.config文件中增加如下配置:
首先增加<configSections>节点,节点值如下:
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
然后在<system.web>节点下增加如下内容:
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.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="false">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.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=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>

接在在web.config根节点下增加<system.web.extensions>节点,节点值如下:
<system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
-->

<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2" />
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
</scripting>
</system.web.extensions>
最后再增加一个<system.webServer>节点,节点值如下:
<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>
这样我们利用微软Ajax控件开发的Ajax应用就能在服务器上正常运行了。
尐孑 2008-12-29
  • 打赏
  • 举报
回复
我把那两个dll考到bin里了,现在能打开了,但是连不上数据库了,唉,真麻烦
cefriend 2008-12-29
  • 打赏
  • 举报
回复
组件的版本不同,,,,,

Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
HDNGO 2008-12-29
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 jiang_jiajia10 的回复:]
服务器上安装ajaxtoolkit,从错误上看你缺少两个dll.
System.Web.Extensions.dll
System.Web.Extensions.Design.dll
把他们放到bin里面引用
[/Quote]

~
chengdishuai 2008-12-29
  • 打赏
  • 举报
回复
肯定是没安装Ajax组件啊,昨天我才遇到过
half_bucket 2008-12-29
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 meixiafeng 的回复:]
组件我安装了 还要不行啊
[/Quote]

============
请为你的项目添加Ajax的组件引用,Config运行的时候才会去寻找对应的组件,并非安装就完事了
尐孑 2008-12-29
  • 打赏
  • 举报
回复
组件我安装了 还要不行啊
jiang_jiajia10 2008-12-29
  • 打赏
  • 举报
回复
服务器上安装ajaxtoolkit,从错误上看你缺少两个dll.
System.Web.Extensions.dll
System.Web.Extensions.Design.dll
把他们放到bin里面引用
mzx87 2008-12-29
  • 打赏
  • 举报
回复
ASP.NET Ajax?
wanghao3616 2008-12-29
  • 打赏
  • 举报
回复
iis 机器上 安装 ajax了吗 安装 一下
或者 把 本地 C盘的ajax 拷到上面 目录相同 就可以了
kingcsx666 2008-12-29
  • 打赏
  • 举报
回复
肯定是相关组件没有安装啊

zhuanshen712 2008-12-29
  • 打赏
  • 举报
回复
你用的ajax是不是安装组件了?这可能是别的机器上没有安装那个组建,缺少某个程序集。
niitnanfeng 2008-12-29
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 HDNGO 的回复:]
引用 5 楼 jiang_jiajia10 的回复:
服务器上安装ajaxtoolkit,从错误上看你缺少两个dll.
System.Web.Extensions.dll
System.Web.Extensions.Design.dll
把他们放到bin里面引用


~
[/Quote]
顶,在服务器上装个 ajaxToolKit也可以。
尐孑 2008-12-29
  • 打赏
  • 举报
回复
烦死了 还没解决

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧