我有一个 SharePoint 2010 服务应用程序,当我尝试在通道上执行一些代码时收到错误消息:
此上下文不支持加密算法''。System.NotSupportedException:此上下文不支持加密算法''。
实际上只有两个 '' 引号,它们之间没有任何内容。我正在为我的 authenticationMode 使用 IssuedToken。这是我的 web.config 文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" defaultLanguage="C#" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="TLAPITypeBehaviors" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="AF.TipAndLeadAPI.TipAndLeadAPIServiceApplication" behaviorConfiguration="TLAPITypeBehaviors">
<endpoint binding="customBinding" bindingConfiguration="TLAPIServiceHttpBinding"
contract="AF.TipAndLeadAPI.ITipAndLeadAPIContract"
address="" />
</service>
</services>
<bindings>
<customBinding>
<binding name="TLAPIServiceHttpBinding">
<security authenticationMode="IssuedTokenOverTransport" allowInsecureTransport="true" />
<textMessageEncoding>
<readerQuotas maxStringContentLength="2048576000" maxArrayLength="2097152000" />
</textMessageEncoding>
<httpTransport maxReceivedMessageSize="2162688" authenticationScheme="Anonymous" useDefaultWebProxy="false" />
</binding>
</customBinding>
</bindings>
</system.serviceModel>
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" />
<windowsAuthentication enabled="false" />
</authentication>
</security>
</system.webServer>
</configuration>
还有我的 client.config 文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<client>
<endpoint address=""
name="http"
binding="customBinding" bindingConfiguration="TLAPIServiceHttpBinding"
contract="AF.TipAndLeadAPI.ITipAndLeadAPIContract" />
</client>
<bindings>
<customBinding>
<binding name="TLAPIServiceHttpBinding">
<security authenticationMode="IssuedTokenOverTransport" allowInsecureTransport="true" />
<textMessageEncoding>
<readerQuotas maxStringContentLength="204857600" maxArrayLength="209715200" />
</textMessageEncoding>
<httpTransport maxReceivedMessageSize="216268800" authenticationScheme="Anonymous" useDefaultWebProxy="false" />
</binding>
</customBinding>
</bindings>
</system.serviceModel>
</configuration>
当我将 authenticationMode 更改为 IssuedTokenOverTransport 之类的内容时,我收到程序集不匹配错误。当我将其更改为带有证书的任何内容时,我会收到证书错误,所以我的猜测是,它与 authenticationMode 有关。
任何帮助将非常感激。