<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.lhotka.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'Data portal' and 'Security'</title><link>http://forums.lhotka.net/search/SearchResults.aspx?a=0&amp;o=DateDescending&amp;tag=Data+portal,Security&amp;orTags=0</link><description>Search results matching tags 'Data portal' and 'Security'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP3 (Build: 36.8414)</generator><item><title>Invalid token for impersonation issue.</title><link>http://forums.lhotka.net/forums/p/8717/41418.aspx#41418</link><pubDate>Wed, 24 Mar 2010 17:46:47 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41418</guid><dc:creator>sliedig</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Wondering if someone can help me with an issue I&amp;#39;m having with accessing the data portal.&lt;/p&gt;
&lt;p&gt;We are using CSLA version 3.6.2. with CSLA Authentication for the DataPortal.&lt;/p&gt;
&lt;p&gt;We have developed a Windows Service that is responsible for generation of data sets that are shared amongst a number of clients. The service also hosts a WCF Services that exposes an endpoint that is consumed by a Pub/Sub implementation.&lt;/p&gt;
&lt;p&gt;When the service starts up, it successfully connects to the data portal (via WCF) and builds the available datasets in the system. No problem.&lt;/p&gt;
&lt;p&gt;When a new dataset definition is created by a client, the Windows Service receives the published event via the pub/sub and attempts to build the dataset from the newly created definition which was saved in the database. It at this point that the attempt to access the database fails with an error:&lt;/p&gt;
&lt;p&gt;&amp;quot;Invalid token for impersonation - it cannot be duplicated.&amp;quot;&lt;/p&gt;
&lt;p&gt;During the initial call (when the service starts up) the DataPortalContext has no identity. When the callback method is invoked by the pub sub, the DataPortalContext has the identity of the host for the PubSub service. I know this because when I hosted the Pub/Sub service is IIS (via WAS), it tried to access the data portal with the identity IIS APPPOOL. &lt;/p&gt;
&lt;p&gt;My initial solution was to add the following to the callback method&lt;/p&gt;
&lt;p&gt;[OperationBehavior(Impersonation = ImpersonationOption.NotAllowed)]&lt;/p&gt;
&lt;p&gt;This actually worked, at least initially. Now it doesn&amp;#39;t and I am not sure why or how to get around the issue of the impersonation token duplication. I&amp;#39;ve read some previous posts that talk about double hops but I am not sure how to resolve that either.&lt;/p&gt;
&lt;p&gt;Your assistance would be appreciated.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Steve&lt;/p&gt;</description></item></channel></rss>