找不到类型"ServiceLib.Web.REST"(在ServiceHost指令中作为服务属性值提供). [英] The type 'ServiceLib.Web.REST', provided as the Service attribute value in the ServiceHost directive could not be found.

查看:210
本文介绍了找不到类型"ServiceLib.Web.REST"(在ServiceHost指令中作为服务属性值提供).的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发布一个简单的Web服务后,通过浏览器访问它时遇到以下错误,例如:

http://localhost/web/get/win32_printer

在IIS中,我还创建了一个名为"Web"的虚拟应用程序.其中包含以下文件:
REST.svc
web.config
因此,localhost下的结构类似于:
http://localhost/bin/xxx.dlls(Web服务文件)

After publishing a simple web service, I encounter the following err when accessing it via the browser, like:

http://localhost/web/get/win32_printer

in the IIS I also created one virtual application named "Web" which contains the following files:
REST.svc
web.config
so, the structure under localhost is like:
http://localhost/bin/xxx.dlls (the web services files)

/web/REST.svc& web.config文件(这是虚拟应用程序文件夹)

/web /REST.svc & web.config file (this is the virtual application folder)

推荐答案

我发现WebServiceHostFactory在service属性中需要一个完全限定的类型名称当服务类型在外部程序集中时:
I have found that WebServiceHostFactory needs a fully qualified type name in the service attribute when the service type is in an external assembly:


这篇关于找不到类型"ServiceLib.Web.REST"(在ServiceHost指令中作为服务属性值提供).的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆