Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2005

Tip: Looking for answers? Try searching our database.

Error: Refereced security token could not be retrieved

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
f.ritz - 22 Nov 2005 21:09 GMT
I have a problem with WSE 2.0 SP3.

I try the AsymmetricEncryption-example from WSE to run, but I wars th
following error: Refereced security token could not be retrieved.
think that the X509certificates am not correctly installed.
The certificates are configure:
Current User->Personal->Client Private.pfx(encrypt the message for WS)
Local Computer->Personal->Server Public.cer(decrypt the message in WS)
web.config of WS:<x509 storeLocation="LocalMashine" verifyTrust="false
/>

Input- and OutputTrace from WebService:

INPUTTRACE.WEBINFO
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
xmlns:xsd="http://www.w3.org/2001/XMLSchema
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://stockservice.contoso.com/wse/samp...ockQuoteRequest</wsa:Action>
<wsa:MessageID>uuid:349ad57d-ab8a-4c37-9e29-dbf19443fd26</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/03/ad.../role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:To>http://localhost/AsymEncryptCodeService/...yptService.asmx</wsa:To>
<wsse:Security soap:mustUnderstand="1">
<wsu:Timestam
wsu:Id="Timestamp-fbf59425-ff72-4060-9d88-fa324b492dcf">
<wsu:Created>2005-11-22T09:17:08Z</wsu:Created>
<wsu:Expires>2005-11-22T09:22:08Z</wsu:Expires>
</wsu:Timestamp>
<xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:EncryptionMetho
Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<wsse:SecurityTokenReference>
<wsse:KeyIdentifie
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X
509SubjectKeyIdentifier

EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.
0#Base64Binary">gBfo0147lM6cKnTbbMSuMVvmFY4=</wsse:KeyIdentifier
>
</wsse:SecurityTokenReference>
</KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>EDyK0BwtvC9yV87UxDU4qD2xkzFzgANqMmS5tmav+DXcsx+u+vbSrrZTq
+9Qgx204ZLER+sOoUcJI0WmbF1lrt+Scxbfdx+9J1BxOxR+gq3VVQC36yiZPKcdhrGu0j4lsIRe
jm5RyjDeghz/KXNQnzyUj0my9sxaLVGxGFmXBTM=</xenc:CipherValue>
</xenc:CipherData>
<xenc:ReferenceList>
<xenc: DataReferenc
URI="#EncryptedContent-693b6744-b751-4254-9bc6-07e325f02620" />
</xenc:ReferenceList>
</xenc:EncryptedKey>
</wsse:Security>
</soap:Header>
<soap:Body>
<xenc:EncryptedDat
Id="EncryptedContent-693b6744-b751-4254-9bc6-07e325f02620
Type="http://www.w3.org/2001/04/xmlenc#Content
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:EncryptionMetho
Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc" />
<xenc:CipherData>
<xenc:CipherValue>0ynHqecmM5EO9EBsD9tBr1Q3lNhtvjTuwUoFCjT7XQ3IjKNG1z5iz1v+4
yDyVmg9Dfvz7Fj3hOB9EW+A7aIhV6cmRceiH1e3rsn2DU
L3nh+WfAzlKbVHXgyhBe3+D3HTX8DFUFIF1ceaGHSReH+FJkLz1CAfwCTyMXunNdcQMT5FiAXFk
QB1nOb/O+6Rwv/ykmrYMpB1XU2crVkOIvuHwh5V1UzSUHo5Dodst+mdvbgVtqGipIw+SNpzNctViiW</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</soap:Body>
</soap:Envelope>

OUTPUTTRACE.WEBINFO
<soap:Envelop
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/03/addressing/fault</wsa:Action>
<wsa:MessageID>uuid:8630b17b-f830-445d-9b54-a0b6c8d76f04</wsa:MessageID>
<wsa:RelatesTo>uuid:349ad57d-ab8a-4c37-9e29-dbf19443fd26</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/03/ad.../role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestam
wsu:Id="Timestamp-8d2e05a2-f228-4ab6-8091-42ba132e2619">
<wsu:Created>2005-11-22T09:17:11Z</wsu:Created>
<wsu:Expires>2005-11-22T09:22:11Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode
xmlns:code="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xs
d">code:SecurityTokenUnavailable</faultcode
>
<faultstring>Microsoft.Web.Services2.Security.SecurityFault: Referenced
security token could not be retrieved
at Microsoft.Web.Services2.Security.EncryptedKey.LoadXml(XmlElement
element)
at Microsoft.Web.Services2.Security.EncryptedKey..ctor(XmlElement
element)
at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement
element)
at
Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(SoapEnvelope
envelope)
at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope
envelope)
at
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage
message)</faultstring>
<faultactor>http://localhost/AsymEncryptCodeService/...yptService.asmx</faultactor>
</soap:Fault>
</soap:Body>
</soap:Envelope>

Signature

f.ritz

Pablo Cibraro - 23 Nov 2005 14:41 GMT
Hi,
You are right, it looks like a problem with the certificates.
WSE is not being able to get the certificate for the encryptedKey. The web
service configuration looks fine with exception of the storeLocation
attribute (LocalMashine instead of LocalMachine).
Could you post your policy files ?, that will help me to clarify the
problem.

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
http://www.lagash.com

> I have a problem with WSE 2.0 SP3.
>
[quoted text clipped - 111 lines]
> </soap:Body>
> </soap:Envelope>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.