C# '中的服务器错误/';应用
我在尝试访问服务时遇到此错误 找不到在ServiceHost指令中作为服务属性值提供的或在配置元素system.serviceModel/serviceHostingEnvironment/serviceActivations中提供的类型“WebRole1.RestServices.RegisterService” 这链接到Web.config文件中的定义 我将我的服务定义如下:C# '中的服务器错误/';应用,c#,visual-studio,visual-studio-2010,windows-services,C#,Visual Studio,Visual Studio 2010,Windows Services,我在尝试访问服务时遇到此错误 找不到在ServiceHost指令中作为服务属性值提供的或在配置元素system.serviceModel/serviceHostingEnvironment/serviceActivations中提供的类型“WebRole1.RestServices.RegisterService” 这链接到Web.config文件中的定义 我将我的服务定义如下: <!-- Service Authenticate --> <service name="Syst
<!-- Service Authenticate -->
<service name="System.Web.ApplicationServices.AuthenticationService" behaviorConfiguration="AuthenticationServiceBehaviors">
<endpoint contract="System.Web.ApplicationServices.AuthenticationService" binding="basicHttpBinding" />
</service>
<!-- Service Register -->
<service name="WebRole1.RestServices.RegisterService" behaviorConfiguration="RegisterServiceBehaviors">
<endpoint contract="WebRole1.RestServices.IRegisterService" binding="basicHttpBinding" />
</service>
该定义适用于身份验证服务,但不适用于注册服务。
我不确定应该为服务命名,但WebRole1.RestServices是RegisterService.svc的名称空间
我确信错误来自Web.config文件。任何人都知道如何纠正这一点
Thx.在Visual Studio中执行以下步骤:
查看标记
选项服务的值
属性以充分反映
基础路径的限定路径
服务类型CodeFile
属性值也正确