Hi Matthias,
Have you tried just doing:
<httpHandlers>
<add type = "MyNamespace.CustomXMLTokenServiceHandler, CustomXMLToken"
path="CustomXMLTokenServiceHandler.ashx" verb="*" />
</httpHandlers>
Please make sure that a virtual directory exists to the directory this this
web.config is located in.
The <tokenIssuer> tag is to configure the token issuer that is going to
issue you your CustomXmlSecurityToken. In particular, this section has many
things that can be configured, for example, how long the CustomSecurityToken
it issues you is valid for, the type of "server token" that this token
issuer uses to sign back the RSTR (which is the response that contains your
custom token), etc..
Were you able to run the CustomXmlSecurity token sample, or was it the
sample that was creating problems?
Thanks,
Sidd [MSFT]
[quoted text, click to view] "Matthias H." <MatthiasH@discussions.microsoft.com> wrote in message
news:03BC932B-3EF3-4AB1-9427-85A9D86710C8@microsoft.com...
> Hi guys,
>
> I am trying to request a CustomXMLSecurityToken from a web application.
>
> <code>
>
> SecurityToken token = new UsernameToken("xxx", "yyy",
> PasswordOption.SendPlainText );
> SecurityTokenServiceClient client = new SecurityTokenServiceClient(new
> Uri("http://host/folder/CustomXMLTokenServiceHandler.ashx"));
> RequestSecurityToken rst = new
> RequestSecurityToken("MyNameSpace#CustomXMLToken", token,
> "http://host/folder/CustomXMLTest.asmx");
> RequestSecurityTokenResponse response;
> response = client.IssueSecurityToken( rst );
> CustomXMLToken issuedToken = response.RequestedSecurityToken.SecurityToken
> as CustomXMLToken;
>
> </code>
>
> And when I run it I am getting the error "WSE101: An asynchronous
operation
> raised an exception."
>
> In the web.config of the web application is the following:
>
> <code snippets>
>
> <httpHandlers>
> <add type = "MyNamespace.CustomXMLTokenServiceHandler, CustomXMLToken"
> path="http://host/folder/CustomXMLTokenServiceHandler.ashx" verb="*" />
> </httpHandlers>
>
> <tokenIssuer>
> <serverToken>
> <KeyInfo xmlns="
http://www.w3.org/2000/09/xmldsig#"> > <wsse:SecurityTokenReference
>
xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri ty-secext-1.0.xsd">
[quoted text, click to view] > <wsse:KeyIdentifier
>
ValueType="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-toke n-profile-1.0#X509SubjectKeyIdentifier">ZPGrPnuqATeSgVjLYcmiY/GSWWY=</wsse:K
eyIdentifier>
[quoted text, click to view] > </wsse:SecurityTokenReference>
> </KeyInfo>
> </serverToken>
> </tokenIssuer>
>
> </code snippets>
>
> I dont know why there is the TokenIssuer tag, but in the example there was
> one. An CustomXMLTokenManager is registered too.
> Does anyone have an idea what I am doing wrong?
>