錯誤資訊:
解決方案:
1、修改相應服務.svc.cs,在類上添加以下辨別
據說:啟用了ajax的wcf服務是預設添加的
請移步到小注中的連結,謝謝
小注:
更詳細的問題分析參考:
<a target="_blank" href="http://blog.csdn.net/jiankunking/article/details/48709731">the service cannot be activated because it does not support asp.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'. description: an unhandled exception occurred during the execution of the current web request. please review the stack trace for more information about the error and where it originated in the code. exception details: system.invalidoperationexception: the service cannot be activated because it does not support asp.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'.</a>