WCF-Adapter SSO Tickets<p align=left><font face=Arial size=2></font> </p> <p>Hi Everyone,</p> <p align=left> </p> <p align=left> </p> <p align=left>I'm trying to use the WCF-Adapter to access an Oracle Database. </p> <p align=left> </p> <p align=left>I'm trying to use SSO to provide credentials to send ports rather than manually enter the password.</p> <p align=left> </p> <p align=left>I've deployed the BTS application, created the SSO affiliate application assigned the mappings etc but when I try to run the application I get the following error.</p> <p align=left> </p> <p align=left> </p> <p align=left><em>Details:&quot;System.Runtime.InteropServices.COMException (0x80004005): Unable to redeem ticket, no ticket exists in the message.</em></p> <p><br><em>   at Microsoft.BizTalk.Interop.IBTSTicket.ValidateAndRedeemTicket(Object message, String applicationName, Int32 flags, String&amp; externalUserName)<br>   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.ApplyClientCredentials(ClientCredentials clientCredentials, IBaseMessage message)<br>   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.CreateChannelFactory[TChannel](IBaseMessage bizTalkMessage)<br>   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1&amp; cachedFactory)<br>   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)&quot;.</em></p> <p><em>For more information, see Help and Support Center at </em><a title="http://go.microsoft.com/fwlink/events.asp" href="http://go.microsoft.com/fwlink/events.asp"><em>http://go.microsoft.com/fwlink/events.asp</em></a><em>.<br></em></p> <p> </p> <p align=left>Obviously the problem is I haven't issued a ticket to the message, which I understand is done by a WCF receive location. I don't have any of those, I use Send/Receive ports to access the Oracle DB. The only receive ports I use are for SQL Server and File.</p> <p align=left> </p> <p align=left>Can anyone explain how I am supposed to issue tickets to messages?</p> <p align=left> </p> <p align=left> </p> <p align=left>Thanks</p>© 2009 Microsoft Corporation. All rights reserved.Wed, 10 Dec 2008 23:10:39 Zaa7709fa-685c-4340-8091-13e9180ed1d5http://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/aa7709fa-685c-4340-8091-13e9180ed1d5#aa7709fa-685c-4340-8091-13e9180ed1d5http://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/aa7709fa-685c-4340-8091-13e9180ed1d5#aa7709fa-685c-4340-8091-13e9180ed1d5SMarshallhttp://social.msdn.microsoft.com/Profile/en-US/?user=SMarshallWCF-Adapter SSO Tickets<p align=left><font face=Arial size=2></font> </p> <p>Hi Everyone,</p> <p align=left> </p> <p align=left> </p> <p align=left>I'm trying to use the WCF-Adapter to access an Oracle Database. </p> <p align=left> </p> <p align=left>I'm trying to use SSO to provide credentials to send ports rather than manually enter the password.</p> <p align=left> </p> <p align=left>I've deployed the BTS application, created the SSO affiliate application assigned the mappings etc but when I try to run the application I get the following error.</p> <p align=left> </p> <p align=left> </p> <p align=left><em>Details:&quot;System.Runtime.InteropServices.COMException (0x80004005): Unable to redeem ticket, no ticket exists in the message.</em></p> <p><br><em>   at Microsoft.BizTalk.Interop.IBTSTicket.ValidateAndRedeemTicket(Object message, String applicationName, Int32 flags, String&amp; externalUserName)<br>   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.ApplyClientCredentials(ClientCredentials clientCredentials, IBaseMessage message)<br>   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.CreateChannelFactory[TChannel](IBaseMessage bizTalkMessage)<br>   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1&amp; cachedFactory)<br>   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)&quot;.</em></p> <p><em>For more information, see Help and Support Center at </em><a title="http://go.microsoft.com/fwlink/events.asp" href="http://go.microsoft.com/fwlink/events.asp"><em>http://go.microsoft.com/fwlink/events.asp</em></a><em>.<br></em></p> <p> </p> <p align=left>Obviously the problem is I haven't issued a ticket to the message, which I understand is done by a WCF receive location. I don't have any of those, I use Send/Receive ports to access the Oracle DB. The only receive ports I use are for SQL Server and File.</p> <p align=left> </p> <p align=left>Can anyone explain how I am supposed to issue tickets to messages?</p> <p align=left> </p> <p align=left> </p> <p align=left>Thanks</p>Fri, 10 Oct 2008 03:16:11 Z2008-10-16T03:46:32Zhttp://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/aa7709fa-685c-4340-8091-13e9180ed1d5#c61c0b0e-e62a-4f2a-a41d-72b12f9c3f2fhttp://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/aa7709fa-685c-4340-8091-13e9180ed1d5#c61c0b0e-e62a-4f2a-a41d-72b12f9c3f2fBen Cline1http://social.msdn.microsoft.com/Profile/en-US/?user=Ben%20Cline1WCF-Adapter SSO Tickets<p>On the receive location for the WCF-Custom adapter where you have specified OracleDBBinding, there is a tab called &quot;Other&quot; where you can specify the credential details. Choose the radio button &quot;Issue Single Sign-On Ticket.&quot; You can alternately choose to associate the port with an affiliate application on this tab. </p> <p align=left> </p> <p align=left>Thanks,</p> <p align=left><font face=Arial size=2></font> </p>Tue, 14 Oct 2008 01:31:28 Z2008-10-14T01:31:28Zhttp://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/aa7709fa-685c-4340-8091-13e9180ed1d5#5028836e-96dd-44bb-a9c3-0908b14b558fhttp://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/aa7709fa-685c-4340-8091-13e9180ed1d5#5028836e-96dd-44bb-a9c3-0908b14b558fSMarshallhttp://social.msdn.microsoft.com/Profile/en-US/?user=SMarshallWCF-Adapter SSO Tickets<p>Hi Ben,</p> <p align=left> </p> <p align=left> </p> <p align=left>Thanks for your response. That will enable me to use SSO when I receive data from Oracle, however it only helps when a receive port is bound to a WCF-Custom receive location.</p> <p align=left> </p> <p align=left>Is there a way to issue SSO Tickets using a WCF-Custom send/receive port when the only receive locations uses another adapter. I'm specifically interested in SQL or FILE adapters?</p> <p align=left> </p> <p align=left> </p> <p align=left>Thanks</p> <p align=left> </p> <p align=left>Stuart</p>Tue, 14 Oct 2008 22:10:28 Z2008-10-14T22:10:28Zhttp://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/aa7709fa-685c-4340-8091-13e9180ed1d5#3f5fbf0d-52af-460b-b1e3-0499e194015fhttp://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/aa7709fa-685c-4340-8091-13e9180ed1d5#3f5fbf0d-52af-460b-b1e3-0499e194015fbsaranhttp://social.msdn.microsoft.com/Profile/en-US/?user=bsaranWCF-Adapter SSO Tickets<p align=left><font face=Arial size=2></font> </p> <p>You have two options:</p> <p align=left>1. use the SSOTicket that is associated with a message received earlier</p> <p align=left>2. issue a SSOTicket.</p> <p align=left> </p> <p align=left>As you mentioned earlier, there are many scenarios where you will not have SSO Ticket associated with a prior message. </p> <p align=left> </p> <p align=left>So you are left with option 2. You need to do the following:</p> <p align=left> </p> <blockquote dir=ltr style="margin-right:0px"> <p align=left>ISSOTicket sso = new ISSOTicket();</p> <p align=left>Message(BTS.SSOTicket) = sso.IssueTicket(0);</p></blockquote> <p align=left> </p> <p align=left>But you will have problems instantiating the ISSOTicket within BTS orchestration. Therefore the solution is to create a helper class-library with following code:</p> <p align=left> </p><font color="#0000ff" size=2> <p>using</font><font size=2> System;</p></font><font color="#0000ff" size=2> <p>using</font><font size=2> System.Collections.Generic;</p></font><font color="#0000ff" size=2> <p>using</font><font size=2> System.Text;</p></font><font color="#0000ff" size=2> <p>using</font><font size=2> Microsoft.BizTalk.SSOClient.Interop;</p></font><font color="#0000ff" size=2> <p>namespace</font><font size=2> SSOHelper</p> <p>{</p> <blockquote dir=ltr style="margin-right:0px"> <p>[</font><font color="#008080" size=2>Serializable</font><font size=2>]</p> <p></font><font color="#0000ff" size=2>public</font><font size=2> </font><font color="#0000ff" size=2>static</font><font size=2> </font><font color="#0000ff" size=2>class</font><font size=2> </font><font color="#008080" size=2>SSOTicket</p></font><font size=2> <p>{</p> <blockquote dir=ltr style="margin-right:0px"> <p dir=ltr></font><font color="#0000ff" size=2>public</font><font size=2> </font><font color="#0000ff" size=2>static</font><font size=2> </font><font color="#0000ff" size=2>string</font><font size=2> IssueTicket()</p> <p dir=ltr>{</p> <blockquote dir=ltr style="margin-right:0px"> <p dir=ltr></font><font color="#008080" size=2>ISSOTicket</font><font size=2> sso = </font><font color="#0000ff" size=2>new</font><font size=2> </font><font color="#008080" size=2>ISSOTicket</font><font size=2>();</p> <p dir=ltr></font><font color="#0000ff" size=2>return</font><font size=2> sso.IssueTicket(0);</p></blockquote> <p dir=ltr>}</p></blockquote> <p>}</p></blockquote> <p>}</p> <p> </p> <p align=left> </p> <p align=left>and call it from the message assignment shape, like so:</font></p><font size=2> <p>Message(BTS.SSOTicket) = SSOHelper.SSOTicket.IssueTicket();</p> <p> </p> <p align=left>and voila - it works</p> <p align=left> </p> <p align=left> </p> <p align=left>Some things to note:</p> <p align=left>1. the argument value must be zero and is ignored in the currentversion of the SSO library</p> <p align=left>2. You can only issue the ticket to yourself. Need to map the OriginatorSID in the SSO Affiliate Application to the external users required.</p> <p align=left>3. The Issued ticket can time out. I would prefer to issue ticket as many times as required, rather than a long time out period.</p> <p> </p> <p align=left>HTH</font></p>Wed, 15 Oct 2008 05:26:04 Z2008-10-16T03:46:32Z