0

As you will notice the [namespace|app name] is not the same from the error to what I used in the config. The files were renamed in the project and I cannot see where it is getting the default service1 name from. I have rebuilt the project and re-published. Do you see anything I may be missing?

Error: The type 'EncServWeb.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

web.config
serviceActivations  
        add service="EncServWeb.Serv" relativeAddress="~/Serv.svc"
serviceActivations
4

2 回答 2

0

在此视频中,我发现必须将服务名称从默认值重新分配给 app.config 文件中新命名的名称。创建您的第一个 WCF 服务。希望这对其他人有帮助!

于 2012-08-09T19:51:25.453 回答
0

我假设您已经编辑了 .svc 文件和网络配置?

不仅仅是网络配置,对吧?如果您没有更改 .svc 文件的内容,这就是错误所在...

如果这不是原因,并且您在 IIS 中托管... http://blogs.msdn.com/b/chrsmith/archive/2006/08/10/wcf-service-nesting-in-iis.aspx

于 2012-08-09T07:04:08.160 回答