部署WCF时遇到这么个错:

"The service cannot be activated because it does not supportASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'."

长长的一大串看着很吓人,但按其中的提示来操作就行了,第一种“Turn off ASP.NET compatibility mode in the web.config”,在web配置文件里搜“serviceHostingEnvironment”,默认的配置是这样的

 <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

把前面那个true改成false即可,如果配置文件里没有这句加上即可,加在system.serviceModel中。或者第二种即在契约类名头部加段配置就行,记得先引用相应的命名空间,不然无法智能提示,按照提示设置成Allowed或者Required.这两种方式选择其中一种设置即可。

The service cannot be activated because it does not support ASP.NET compatibility相关推荐

  1. Windows Azure Cloud Service (39) 如何将现有Web应用迁移到Azure PaaS平台

    <Windows Azure Platform 系列文章目录> 本文将简单介绍,如何将企业内现有的ASP.NET应用程序迁移到Azure PaaS平台. 因为在迁移过程中,可能需要对现有的 ...

  2. Step by Step 创建一个 Web Service

    原创地址:http://www.cnblogs.com/jfzhu/p/4022139.html 转载请注明出处 (一)创建Web Service 创建第一个项目,类型选择ASP.NET Empty ...

  3. Making Sense of all these Crazy Web Service Standards

    转自: https://www.infoq.com/articles/ws-standards-wcf-bustamante It has been eight years now since SOA ...

  4. Windows XP Service Pack 3 修复程序列表

    编号文章标题类别274261 (http://support.microsoft.com/kb/274261/)超级终端缓冲区历史可能出现损坏修复297694 (http://support.micr ...

  5. 如何覆盖docker.service文件中的配置,解决一次docker.service启动不成功的问题

    一.问题 服务器重启之后systemctl restart docker始终不成功,网上各种方法都试了一遍,依然没有解决问题. systemctl restart docker 报错信息: [root ...

  6. C#之VS2010ASP.NET页面调用Web Service和winform程序调用Web Service

    一:用ASP.NET调用Web Service 打开VS2010,打开"文件-新建-网站",选择"ASP.NET网站" 选好存储位置,语言后点击确定,进入默认页 ...

  7. remoteing2

    此示例主要演示了net remoting,其中包含一个服务器程序Server.exe和一个客户端程序CAOClient.exe.客户端程序会通过http channel调用服务器端RemoteType ...

  8. Serve Django Applications with uWSGI and Nginx

    @(tigerfive)[django][uwsgi][nginx][centos7] How To Serve Django Applications with uWSGI and Nginx on ...

  9. IIS 部署WCF时遇到这么个错:

    转(http://blog.csdn.net/vic0228/article/details/48806405) 部署WCF时遇到这么个错: "The service cannot be a ...

最新文章

  1. 通过一道题目来理解互斥和同步
  2. OpenGL Drawing Commands绘图命令的实例
  3. MySql—索引原理
  4. Dropbox推独立应用,公司估值已达100亿美元
  5. chrome浏览器上传文件延迟_UEditor chrome 点击上传文件选择框会延迟几秒才会显示...
  6. 菜单向上拉html,模拟select控件,CSS上拉菜单
  7. php xml 留言板,php xml留言板 xml存储数据的简单例子
  8. vue的一些基本指令,搭建、编译、运行、打包
  9. java.lang.IllegalArgumentException: name MUST NOT NULL! at org.nutz.dao.impl.NutDao.fetch
  10. BZOJ3675[APIO2014] 序列分割
  11. LabVIEW编程LabVIEW控制研华PCI 1220运动控制卡例程与相关资料
  12. 2021年上半年软件设计师下午真题及答案解析
  13. openwrt中br-lan,eth0,eth0.1,eth0.2
  14. 人脸识别的流行用途有哪些
  15. HASH JOIN ,MERGE JOIN ,NESTED LOOP用法效率比较
  16. win7 无法给系统保留的100M空间分配盘符时,用下面的方法就好
  17. Delos和EDGE Technologies携手推进智能健康建筑管理系统
  18. 矩阵的QR分解以及在最小二乘法中的应用
  19. [JavaScript]基础知识复习题附答案
  20. 从语义分析到操作系统,图灵机器人明年就能走进你家?

热门文章

  1. Socket编程面试问题
  2. Accumulation Degree --- 换根dp
  3. 如何使用phpdoc生成PHP文档
  4. linux虚拟机怎么联网
  5. 邮件中的网页链接地址打不开的解决方法
  6. Proxifier+secureCRT建立隧道
  7. wifi 小程序 透传_微信小程序一键连wifi
  8. error LNK2019: 无法解析的外部符号 _Direct3DCreate9@4,该符号在函数 long __cdecl InitD3D(struct HWND__ *) (?InitD3D
  9. 图像处理里面调色板(Palette)是什么意思?
  10. 实现电路阻抗匹配的两个方法