I created Web App with service to receive claims using WS-Trust protocol for some Silverlight app. I see claims are created in GetOutputClaimsIdentity() method (called twice-why?), but on Silverligh level I receive 'Not Found' message (empty stream?).
Silverlight support for WS-Trust I took from latest WIF Training kit. I was trying to debug code on server side, but unfortunately WIF source code is not available as part of .NET Framework debugging yet :(
So I have no idea why it doesn't send back properly the response with claims to client app.
Content of Web.config file for WS-Trust project is below (I use self signed cert currently):
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="microsoft.identityModel" type="Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>
<appSettings>
<add key="IssuerName" value="PatientInfo"/>
<add key="SigningCertificateName" value="CN=PatientInfo"/>
<!--<add key="EncryptingCertificateName" value="CN=DefaultApplicationCertificate"/>-->
<add key="EncryptingCertificateName" value=""/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0" >
<assemblies>
<add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<authentication mode="None"/>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment
aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<ws2007HttpBinding>
<binding name="ws2007HttpBindingConfiguration">
<security mode="TransportWithMessageCredential">
<message establishSecurityContext="false" clientCredentialType="UserName" />
</security>
</binding>
</ws2007HttpBinding>
</bindings>
<services>
<service name="Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract" behaviorConfiguration="ServiceBehavior">
<endpoint address="IWSTrust13"
binding="ws2007HttpBinding"
bindingConfiguration="ws2007HttpBindingConfiguration"
contract="Microsoft.IdentityModel.Protocols.WSTrust.IWSTrust13SyncContract"/>
<host>
<baseAddresses>
<add baseAddress="https://WIN-8LUMNJ5E6S4/PatientHistInfo.WS-Trust/InternalAuthentication.svc" />
</baseAddresses>
</host>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</se开发者_StackOverflow社区rvices>
</system.serviceModel>
<microsoft.identityModel>
<service>
<securityTokenHandlers>
<remove type="Microsoft.IdentityModel.Tokens.WindowsUserNameSecurityTokenHandler, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add type="eSoft.Server.Security.CustomUserNamePasswordTokenHandler, PatientHistInfo.WS-Trust"/>
</securityTokenHandlers>
</service>
</microsoft.identityModel>
<system.diagnostics>
<sources>
<source name="Microsoft.IdentityModel" switchValue="Verbose">
<listeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="WIFTrace.txt" />
</listeners>
</source>
</sources>
<trace autoflush="true" />
</system.diagnostics>
</configuration>
Fiddler result is below:
HTTP/1.1 504 Fiddler - Receive Failure Content-Type: text/html Connection: close Timestamp: 15:41:21.666
ReadResponse() failed: The server did not return a response for this request.
What can cause such issue?
精彩评论