首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >找不到ServiceHost指令中的WCF、服务属性值

找不到ServiceHost指令中的WCF、服务属性值
EN

Stack Overflow用户
提问于 2009-04-06 09:39:53
回答 18查看 195.2K关注 0票数 76

我试图用IIS6托管我的服务,但我总是得到这个异常。

代码语言:javascript
复制
    Server Error in '/WebServices' Application.
--------------------------------------------------------------------------------

The type 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found. 
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 type 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[InvalidOperationException: The type 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found.]
   System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +6714599
   System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +604
   System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +46
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +654

[ServiceActivationException: The service '/WebServices/dm/RecipientService.svc' cannot be activated due to an exception during compilation.  The exception message is: The type 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found..]
   System.ServiceModel.AsyncResult.End(IAsyncResult result) +15626880
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15546921
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
   System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +227
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 

我完全没有线索,除了它似乎找不到我的程序集。代码应该使用公共类正确编译。

这是我的.svc文件:

代码语言:javascript
复制
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>

我试着创建一个非常非常简单的服务,它也不包含任何东西,看看这是否可以工作,但仍然显示相同的老错误。

代码语言:javascript
复制
The type 'IISHost.Service1', provided as the Service attribute value in the ServiceHost directive could not be found. 
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/720807

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档