Sitecore WeBlog(asp net Web Service)安全性

时间:2014-10-27 14:35:48

标签: asp.net web-services sitecore sitecore7 weblog

我的Sitecore环境有单独的CM& CD服务器,位于不同的域上。安装WeBlog模块并按照说明设置配置后,我收到以下错误(在this page上突出显示)。

  

无法满足安全令牌的请求,因为   验证失败。

     

异常详细信息:System.ServiceModel.FaultException:请求   无法满足安全令牌,因为身份验证失败。

将CM服务器置于防火墙之后,最简单的解决方案可能是不用担心身份验证,但我无法实现这一点。我现在收到这个错误:

  

无法处理邮件。这很可能是因为   操作'http://tempuri.org/ICommentService/SubmitComment'不正确   或者因为邮件包含无效或过期的安全上下文   令牌或因为绑定之间存在不匹配。安全   如果服务中止通道到期,则上下文令牌将无效   不活动。防止服务中止空闲会话   过早增加服务端点上的接收超时   结合。

CM服务器(服务器)web.config如下所示:

<system.serviceModel>
  <bindings>
  <wsHttpBinding>
    <binding name="WeBlogBindingConfig">
      <security mode="None">
        <transport clientCredentialType="None" />
        <message establishSecurityContext="false" />
      </security>
    </binding>
  </wsHttpBinding>
  <basicHttpBinding>
  ...
  </basicHttpBinding>
</bindings>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
  <behaviors>
      <serviceBehaviors>
          <behavior name="Sitecore.Modules.WeBlog.Services.CommentServiceBehaviour">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
          </behavior>
      </serviceBehaviors>
  </behaviors>
  <services>
      <service name="Sitecore.Modules.WeBlog.Services.CommentService"
        behaviorConfiguration="Sitecore.Modules.WeBlog.Services.CommentServiceBehaviour">
          <endpoint address="" binding="wsHttpBinding" contract="Sitecore.Modules.WeBlog.Services.ICommentService" bindingConfiguration="WeBlogBindingConfig">
          </endpoint>
      </service>
  </services>
</system.serviceModel>

虽然CD服务器(客户端)web.config看起来像这样:

<system.serviceModel>
  <bindings>
  <wsHttpBinding>
    <binding name="WeBlogBindingConfig">
      <security mode="None">
        <transport clientCredentialType="None" />
        <message establishSecurityContext="false" />
      </security>
    </binding>
  </wsHttpBinding>
  <basicHttpBinding>
  ...
  </basicHttpBinding>
  </bindings>
  <client>
      <endpoint address="http://cmserver/sitecore modules/web/WeBlog/Comment.svc"
        binding="wsHttpBinding" contract="Sitecore.Modules.WeBlog.Services.ICommentService"
        name="WeBlogCommentService" bindingConfiguration="WeBlogBindingConfig">
      </endpoint>
      ...
</client>
</system.serviceModel>

我已经和他斗争了几天了,所以任何帮助都会非常感激。

萨德

0 个答案:

没有答案
相关问题