JQuery用REST方式访问WCF的服务在开发环境成功,发布到2008的IIS7上,提示扩展名称“enableWebScript”未注册

明行 2011-10-27 04:45:34
JQuery用REST方式访问WCF的服务在开发环境成功,发布到2008的IIS7上,提示扩展名称“enableWebScript”未注册:


说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。

分析器错误消息: 配置中存在无效元素。扩展名称“enableWebScript”未在 system.serviceModel/extensions/behaviorExtensions 中的集合中注册。

源错误:


行 37: <endpointBehaviors>
行 38: <behavior name="WebMasterBehavior">
行 39: <enableWebScript />
行 40: </behavior>
行 41: </endpointBehaviors>


源文件: C:\inetpub\wwwroot\ddddd\web.config 行: 39


--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.4216; ASP.NET 版本:2.0.50727.4209
...全文
205 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
明行 2011-10-27
  • 打赏
  • 举报
回复
查找了一下,搞定了!
aspnet_regiis.exe -i -enable
明行 2011-10-27
  • 打赏
  • 举报
回复
兄弟,我知道是2.0的版本,但在IIS里,你只能选择2.0或者4.0,我使用的3.5开发,选择4.0的话,如下错:
未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.TypeLoadException: 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[TypeLoadException: 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。]
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +95
System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +54
System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +65
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +69
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +52

[ConfigurationErrorsException: 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。]
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +360
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) +27
System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +44
System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +52
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +200
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1365
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +95
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253

[HttpException (0x80004005): 未能从程序集“System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”中加载类型“System.ServiceModel.Activation.HttpModule”。]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9079260
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256




--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.237
todayclock 2011-10-27
  • 打赏
  • 举报
回复
版本信息: Microsoft .NET Framework 版本:2.0.50727.4216; ASP.NET 版本:2.0.50727.4209
明行 2011-10-27
  • 打赏
  • 举报
回复
搞死我了,怀疑是不是因为.net2.0 system.serviceModel/extensions/behaviorExtensions没有这个扩展名称,但除了选择2.0,就只能选择4.0,我使用3.5开发的WCF,这怎么办呢?

62,243

社区成员

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

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

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

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