【问题标题】:The Type xx provided as the Service attribute value in the ServiceHost directive作为 ServiceHost 指令中的 Service 属性值提供的 Type xx
【发布时间】:2014-07-16 03:15:23
【问题描述】:

浏览到http://xxx/mysite/_vti_bin/service/service.svc时出错

类型 NameSpace.Classx、AssemblyName、Version=1.1.1.1、Culture=neutral、PublicKeyToken=xxx 作为 ServiceHost 指令中的 Service 属性值提供,或在配置元素 system.serviceModel/serviceHostingEnvironment/serviceActivations 中提供被发现

  • 当我运行 gac /l 时,我发现与屏幕上完全一样的程序集
  • 接口 NameSpace.iInterface 在 servicecontract 文件中准确说明
  • 主要的 NameSpace.Classx 与所述完全一致
  • assemblyInfo.cs 的 AssemblyName 与所述完全相同
  • 我通过解决方案将其部署到 SP 下的 ISAPI/myfolder,因此无需更改虚拟目录/应用程序设置
  • 将项目输出路径更改为 /bin fom /bin/x86
  • 我可以看到文件部署在物理 /ISAPI/myfolder 中
  • 清理、删除 bin 和 obj 文件夹、构建、部署
  • 还尝试在下面创建一个 /bin 文件夹并将程序集放入其中
  • 其余服务以 .Net 4.5 为目标(因为需要 SP2013)

从昨天开始就发生这种情况,据我所知,我没有改变任何事情。然而从昨天开始发生了什么 调试 WCF Rest 服务不再起作用(调试 > IE 打开 > 从不跳转到 Visual Studio),过了一会儿...... 这发生了。

【问题讨论】:

    标签: visual-studio-2013 sharepoint-2013 wcf-data-services


    【解决方案1】:

    程序集改为编译为x86,设置回64位编译时,错误已解决。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-26
      • 1970-01-01
      相关资源
      最近更新 更多