English 中文(简体)
利用银星号的“意识”索赔
原标题:Accessing a Claim Aware WCF from Silverlight

我正在处理一项银星4号申请,该申请与WCF服务公司的索赔连接。 我正在使用以下法典,将我WCF中证明的这项要求重新归为授权。

IClaimsPrincipal principal = ( IClaimsPrincipal )Thread.CurrentPrincipal;   
IClaimsIdentity identity = ( IClaimsIdentity )principal.Identity;
return string.Format( "You entered: {0} and you are {1}", value, identity.Name );

当我使用WCF中的WsHttpBled,并用一个ole子加以尝试时,它会做罚款。 但是,由于银根只支持基本Http和定制,即不能使用WsHttp, ws2007 Http或任何其它约束。 我没有从银灯把IClaimIdentity引向我的WCF。

我是否可以使用任何具有约束力的银星号,并且仍在我的WCF中获得这种要求。 是否有任何指导/帮助文本,我可以读到更多内容。

我的妇联环境是:

<system.serviceModel>
    <services>
      <service name="ClainAwareWCF.Service" behaviorConfiguration="ClainAwareWCF.ServiceBehavior">
        <endpoint address="" binding="basicHttpBinding" contract="ClainAwareWCF.IService" bindingConfiguration="basicbind">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
        <binding name="basicbind">
          <security mode="TransportCredentialOnly"></security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ClainAwareWCF.ServiceBehavior" > 
          <federatedServiceHostConfiguration/>
          <serviceMetadata  httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <extensions>      
      <behaviorExtensions>
        <add name="federatedServiceHostConfiguration" type="Microsoft.IdentityModel.Configuration.ConfigureServiceHostBehaviorExtensionElement, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </behaviorExtensions>
    </extensions>
  </system.serviceModel>
最佳回答

由于这些具有约束力的问题,以及客户对SL(Windows/Forms/WIF/etc)的认识保障,从客户那里直接打电话不会发生,但一种做法是利用RIA服务域域名认证服务,通过WCF RIA Invoke终端点验证服务并从服务器部门打电话。 用户的安全环境与客户密切相关,你可以直截了当地将数据放在电线上。

This may get you in the right direction:

问题回答




相关问题
Silverlight Rich text box control

Our team decided that we need our own custom Rich text box control for Silverlight app we are developing. We looked at existing controls mentioned at A good rich text control for Silverlight but ...

Silverlight ImageBrush not rendering (with Bing Map Control)

I m trying to add an image to a Pushpin instance from the Silverlight Bing Map Control, but I can t seem to get it to render (the pushpin renders fine). This is probably a general WPF question rather ...

Silverlight OpenFileDialog DoEvents equivalent

I m processing large files after they are selected by the user. My code looks like the following: if (FileDialog.ShowDialog() == true) { // process really big file } This freezes up the UI so ...

list of controls with templates in silverlight

Does anyone know where to find a list of controls that you can set the template on in Silverlight? I ve wasted several hours now trying to create control templates only to find that the control doesn ...

Silverlight, Updating the UI during processing

I have a simple silverlight multifile upload application, and i want to provide the user with some feedback, right now its only in a test phase and i dont have the webservice. Somehow i cant get the ...

Silverlight 3 - FindName returns null

This looks a bug to me.. Using Silverlight 3 and i have a user control defined in XAML and trying to access the object during runtime returns a null. <Grid> <common:CommonGridEditPanel x:...

silverlight 3 collection binding

Someone please help me understand why this binding does not work... I have a class called SelectionManager with a property called dates which is populated by a WCF service. The property is an ...

热门标签