此服务的Wcf协作室元数据发布当前已禁用
我正在尝试连接到使用castles Wcf设施配置的Wcf服务 当我在浏览器中访问服务时,我会得到:此服务的Wcf协作室元数据发布当前已禁用,wcf,castle-windsor,Wcf,Castle Windsor,我正在尝试连接到使用castles Wcf设施配置的Wcf服务 当我在浏览器中访问服务时,我会得到: Metadata publishing for this service is currently disabled. 它列出了大量指令,但我无法执行,因为配置不在web.config中 当我尝试使用VS/add服务引用进行连接时,我得到: The HTML document does not contain Web service discovery information. Metadat
Metadata publishing for this service is currently disabled.
它列出了大量指令,但我无法执行,因为配置不在web.config中
当我尝试使用VS/add服务引用进行连接时,我得到:
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'http://s.ibzstar.com/userservices.svc'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://s.ibzstar.com/userservices.svc. The client and service bindings may be mismatched.
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
If the service is defined in the current solution, try building the solution and adding the service reference again.
有人知道我需要做什么才能让它工作吗
终端客户端是一款iPhone应用程序,如果有必要的话,它使用Monotouch编写,因此客户端没有castle windsor
干杯
w://
以下是服务中的Windsor.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<components>
<component id="eventServices"
service="IbzStar.Domain.IEventServices, IbzStar.Domain"
type="IbzStar.Domain.EventServices, IbzStar.Domain"
lifestyle="transient">
</component>
<component id="userServices"
service="IbzStar.Domain.IUserServices, IbzStar.Domain"
type="IbzStar.Domain.UserServices, IbzStar.Domain"
lifestyle="transient">
</component>
Web.config部分:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="IbzStar.WebServices.Service1Behavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
My App_Start包含以下内容:
Container = new WindsorContainer(new XmlInterpreter(new ConfigResource()))
.AddFacility<WcfFacility>()
.Install(Configuration.FromXmlFile("Windsor.config"));
Container=新WindsorContainer(新的XML解释器(新的ConfigResource()))
.AddFacility()
.Install(Configuration.FromXmlFile(“Windsor.config”);
至于客户端配置-我正在使用向导添加服务。根据此处的错误消息: HTML文档不包含Web文档 服务发现信息。 元数据包含一个 无法解决: '' 这可能意味着WCF发布其WSDL文件的方式存在问题——它通常包含对一个单独的外部XSD文件的引用,这是许多客户端无法处理的(即使它100%符合标准) 内容类型应用程序/soap+xml; 不支持字符集=utf-8 服务 . 客户端和服务绑定可能是 不匹配。 远程服务器返回了一个错误: (415)无法处理该消息 因为内容类型 '应用程序/soap+xml;字符集=utf-8' 不是预期的类型“text/xml”; 字符集=utf-8' 这似乎表明客户机想要谈论SOAP,而服务器没有配置SOAP(可能是REST)
您需要向我们提供有关服务器和客户端配置的更多信息!肯定有某种不匹配的地方。。。。但是如果没有更多信息,我们所能做的就是猜测….您的
web.config
中的服务部分是空的。温莎WCF设施不排除配置要求;它仍然需要在那里,并且需要与Windsor.config
中的组件
部分相匹配
从-这一切都需要进入您的web.config:
<services>
<service name="IbzStar.Domain.EventServices"
behaviorConfiguration="IbzStar.WebServices.Service1Behavior">
<endpoint contract="IbzStar.Domain.IEventServices"
binding="basicHttpBinding"/>
</service>
</services>
以下是更新的配置:
<system.serviceModel>
<!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>-->
<services>
<service behaviorConfiguration="userServicesBehaviour" name="userServices">
<endpoint binding="wsHttpBinding" contract="IbzStar.WebServices.IUserServices" />
<endpoint binding="basicHttpBinding" contract="IbzStar.WebServices.IUserServices" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="userServicesBehaviour">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
我遇到的问题与本网站上的示例非常接近:
zip被附加到博客文章中——这个例子也没有发布任何元数据
我将如何处理此代码以使其正常工作?如果我能看到我可以做我自己的工作
w://显示服务器端配置!!没有这些,这只是盲目的猜测。。。。。您使用什么绑定?什么行为?您试图连接到哪里(什么URL)???您的服务是在IIS中托管还是自托管?您可以发布服务配置的端点部分吗?我想知道您是否禁用了mex端点。由于我正在使用WCF功能,此位不在我的web.config中。嘿-感谢您的帮助-现在-我正在尝试获取运行说明,因此我正在运行C:\Program Files\Microsoft SDK\Silverlight\v3.0\Tools\SlSvcUtil.exe/noConfig阶段。即使我尝试在VisualStudio中添加引用,也会失败-这有点奇怪?w://@cvista:不,如果您的服务不发布任何元数据,slsvcutil
应该如何计算客户端的外观??您需要首先解决服务器端的“无元数据”问题-在此之前,任何事情都不会起作用…使用我在下面回答的工具,这实际上是正常的。您已经尝试为同一地址设置了两个HTTP端点。如果不更改其中一个端点的地址,则不能同时拥有basicHttpBinding
端点和wsHttpBinding
端点。