<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Refresh and login</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : Refresh and login</description>
  <pubDate>Wed, 22 Apr 2026 19:40:08 -700</pubDate>
  <lastBuildDate>Tue, 26 Jun 2012 00:50:20 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3479</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Refresh and login :   Good to know. Thanks. </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13903#13903</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 26-Jun-2012 at 12:50am<br /><br />Good to know. Thanks.]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 00:50:20 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13903#13903</guid>
  </item> 
  <item>
   <title>Refresh and login :   Hello Marcel,here&amp;#039;s the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13902#13902</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 26-Jun-2012 at 12:40am<br /><br />Hello Marcel,<div>&nbsp;</div><div>here's the solution!</div><div>&nbsp;</div><div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;"><span style="color: blue;">&lt;</span><span style="color: rgb163, 21, 21;">authentication</span><span style="color: blue;"> </span><span style="color: red;">mode</span><span style="color: blue;">=</span>"<span style="color: blue;">Forms</span>"<span style="color: blue;">&gt;</span></p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;"><span style="color: blue;">&nbsp; &nbsp; &lt;</span><span style="color: rgb163, 21, 21;">forms</span><span style="color: blue;"> </span><span style="color: red;">name</span><span style="color: blue;">=</span>"<span style="color: blue;">.my_ASPXAUTH</span>"<span style="color: blue;"> </span><span style="color: red;">timeout</span><span style="color: blue;">=</span>"2880"<span style="color: blue;">&gt; </span>&nbsp;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;"><span style="color: blue;">&nbsp; &nbsp; &lt;/</span><span style="color: rgb163, 21, 21;">forms</span><span style="color: blue;">&gt;</span></p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;"><span style="color: blue;">&nbsp; &lt;/</span><span style="color: rgb163, 21, 21;">authentication</span><span style="color: blue;">&gt;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></span>&nbsp;</div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;">Thanks again</div><!--EndFragment--></div>]]>
   </description>
   <pubDate>Tue, 26 Jun 2012 00:40:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13902#13902</guid>
  </item> 
  <item>
   <title>Refresh and login : I don&amp;#039;t remember from the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13901#13901</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 25-Jun-2012 at 10:08am<br /><br />I don't remember from the top of my head if there's a way to tell ASP.NET how long an authentication cookie is valid. There probably is setting, but I would have to dig it up myself first.<DIV>&nbsp;</DIV><DIV>In your case, though, don't you want a temporary cookie? It sounds like you have a persistent cookie. The browser clears all temporary cookies when you close it. Set the isPersistent flag to false and the cookie should expire as soon as you close the browser.</DIV>]]>
   </description>
   <pubDate>Mon, 25 Jun 2012 10:08:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13901#13901</guid>
  </item> 
  <item>
   <title>Refresh and login : Hello Marcel,just a question...can...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13900#13900</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 24-Jun-2012 at 11:50pm<br /><br />Hello Marcel,<br>just a question...can I define somewhere the duration of the session cookie?I've an app that stays logged after 3 days!<br>Thanks<br>]]>
   </description>
   <pubDate>Sun, 24 Jun 2012 23:50:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13900#13900</guid>
  </item> 
  <item>
   <title>Refresh and login :   Hello Marcel,It worked! Thanks...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13819#13819</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 11-Jun-2012 at 11:42pm<br /><br />Hello Marcel,<div>It worked! Thanks a lot!</div>]]>
   </description>
   <pubDate>Mon, 11 Jun 2012 23:42:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13819#13819</guid>
  </item> 
  <item>
   <title>Refresh and login : Sorry, hit post before I finished...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13800#13800</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 07-Jun-2012 at 5:02pm<br /><br /><P>Sorry, hit post before I finished my thought. </P><DIV>Don't specify the domain attribute in the web.config and it should work.</DIV>]]>
   </description>
   <pubDate>Thu, 07 Jun 2012 17:02:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13800#13800</guid>
  </item> 
  <item>
   <title>Refresh and login : I had somebody look at this. The...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13799#13799</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 07-Jun-2012 at 4:58pm<br /><br />I had somebody look at this. The issue appears to be your use of the domain attribute in the Forms element.<DIV>&nbsp;</DIV><DIV>&lt;forms name=".myClient_ASPXAUTH" domain="myApp"&gt;<BR></DIV><DIV>The domain is the Cookie.Domain that sets the URI for which the Cookie is valid. Problem with that is if a subsequent request is not coming into that subdomain, which is most likely the case in your app, then the Cookie isn't visible to the server, because it's only valid in the myApp domain. </DIV><DIV>&nbsp;</DIV><DIV><a href="http://msdn.microsoft.com/en-us/library/system.net.&#099;ookie.domain%28v=VS.80%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.net.cookie.domain(v=VS.80).aspx</A></DIV>]]>
   </description>
   <pubDate>Thu, 07 Jun 2012 16:58:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13799#13799</guid>
  </item> 
  <item>
   <title>Refresh and login : I&amp;#039;m gonna have to repro this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13790#13790</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 07-Jun-2012 at 11:06am<br /><br />I'm gonna have to repro this on my end to see what's happening, but that's gonna take a while. I don't have much bandwith at the moment. ]]>
   </description>
   <pubDate>Thu, 07 Jun 2012 11:06:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13790#13790</guid>
  </item> 
  <item>
   <title>Refresh and login :   Hello Marcel,I&amp;#039;ve tried...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13781#13781</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 07-Jun-2012 at 1:15am<br /><br />Hello Marcel,<div>I've tried but with no luck........pressing F5 returns me false and Principal = null...here's my code</div><div>&nbsp;</div><div>web.config</div><div>&nbsp;</div><div>&nbsp;&lt;ideablade.configuration version="6.00" xmlns="<a href="http://schemas.ideablade.com/2010/IdeaBladeC&#111;nfig" target="_blank">http://schemas.ideablade.com/2010/IdeaBladeConfig</a>"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;logging logFile="log\DebugLog.xml"/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;objectServer&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;serverSettings allowAnonymousLogin="false" useAspNetSecurityServices="true"/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/objectServer&gt;<br>&nbsp; &lt;/ideablade.configuration&gt;<br>&nbsp; &lt;system.serviceModel&gt;<br>&nbsp;&nbsp;&nbsp; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/&gt;<br>&nbsp; &lt;/system.serviceModel&gt;<br>&nbsp; &lt;system.web&gt;<br>&nbsp;&nbsp;&nbsp; &lt;roleManager enabled="true"/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;authentication mode="Forms"&gt;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;forms name=".myClient_ASPXAUTH" domain="myApp"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/forms&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/authentication&gt;</div><div>&nbsp;</div><div>ShellViewModel :</div><div>&nbsp;</div><div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;"><span style="color: blue;">private</span> <span style="color: rgb43, 145, 175;">IEnumerable</span>&lt;<span style="color: rgb43, 145, 175;">IResult</span>&gt; PerformLogin()</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp; {</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: rgb43, 145, 175;">IAuthenticationService</span> authenticationService = <span style="color: rgb43, 145, 175;">IoC</span>.Get&lt;<span style="color: rgb43, 145, 175;">IAuthenticationService</span>&gt;();</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: rgb43, 145, 175;">OperationResult</span> operation;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">bool</span> isLogged = <span style="color: blue;">false</span>;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">yield</span> <span style="color: blue;">return</span> (operation = authenticationService.LoginAsync(<span style="color: blue;">null</span>)).ContinueOnError();</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">try</span></p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; {</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; isLogged = authenticationService.IsLoggedIn;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; }</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">catch</span> (<span style="color: rgb43, 145, 175;">Exception</span> ex)</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; {</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; isLogged = <span style="color: blue;">false</span>;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; }</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">if</span> (!isLogged)</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">yield</span> <span style="color: blue;">return</span> loginFactory.CreatePart();</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;&nbsp;&nbsp; &nbsp; ActivateItem(dashboardManagerViewModel);</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><p style=": white; margin: 0px; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp; }</p><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;</div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;">my LoginCredential :</div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;</div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"><p style="margin: 0px;">&#091;<span style="color: rgb43, 145, 175;">DataContract</span>&#093;</p><p style="margin: 0px;">&nbsp; <span style="color: blue;">public</span> <span style="color: blue;">class</span> my<span style="color: rgb43, 145, 175;">LoginCredential</span> : <span style="color: rgb43, 145, 175;">FormsAuthenticationLoginCredential</span>, <span style="color: rgb43, 145, 175;">IKnownType</span> </p><p style="margin: 0px;">&nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">public</span> myLoginCredential(<span style="color: blue;">string</span> username, <span style="color: blue;">string</span> password, <span style="color: blue;">string</span> domain = <span style="color: rgb163, 21, 21;">""</span>) : <span style="color: blue;">base</span>(username, password, domain,<span style="color: blue;">true</span>)&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; { }</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&#091;OMITTED&#093;</p><div></div><p style="margin: 0px;">&nbsp; }</p><div>&nbsp;</div><div>and finally my loginmanager</div><div>&nbsp;</div><div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"><p style="margin: 0px;"><span style="color: blue;">public</span> <span style="color: blue;">class</span> my<span style="color: rgb43, 145, 175;">LoginManager</span> : <span style="color: rgb43, 145, 175;">AspAuthenticatingLoginManager</span></p><p style="margin: 0px;">&nbsp;{</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">public</span> myLoginManager()</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; : <span style="color: blue;">base</span>()</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb43, 145, 175;">membership</span>.Provider.ApplicationName = <span style="color: rgb163, 21, 21;">"TMRApp"</span>;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; System.Web.Security.<span style="color: rgb43, 145, 175;">Roles</span>.ApplicationName = <span style="color: rgb163, 21, 21;">"TMRApp"</span>;</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">string</span> a = System.Web.<span style="color: rgb43, 145, 175;">HttpContext</span>.Current.Session.SessionID;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; }</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">protected</span> <span style="color: blue;">override</span> <span style="color: blue;">bool</span> ValidateUserCore(<span style="color: rgb43, 145, 175;">ILoginCredential</span> credential)</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; {</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">bool</span> res = <span style="color: blue;">base</span>.ValidateUserCore(credential);</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> res;</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; }</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">protected</span> <span style="color: blue;">override</span> <span style="color: rgb43, 145, 175;">IIdentity</span> CreateIdentityCore(<span style="color: blue;">string</span> name, <span style="color: blue;">string</span> authenticationType, <span style="color: blue;">bool</span> isAuthenticated)</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb43, 145, 175;">IIdentity</span> identity = <span style="color: blue;">base</span>.CreateIdentityCore(name, authenticationType, isAuthenticated);</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> identity;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; }</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">protected</span> <span style="color: blue;">override</span> <span style="color: rgb43, 145, 175;">IPrincipal</span> CreatePrincipalCore(<span style="color: rgb43, 145, 175;">IIdentity</span> identity, System.Collections.Generic.<span style="color: rgb43, 145, 175;">IEnumerable</span>&lt;<span style="color: blue;">string</span>&gt; roles)</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">var</span> user = <span style="color: blue;">new</span> <span style="color: rgb43, 145, 175;">IFUser</span>(identity, identity.Name);</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb43, 145, 175;">MembershipUser</span> membershipUser = <span style="color: rgb43, 145, 175;">membership</span>.GetUser(identity.Name);</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb43, 145, 175;">Guid</span> userID = (<span style="color: rgb43, 145, 175;">Guid</span>)membershipUser.ProviderUserKey;</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; user.IDUtente = userID;</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> user;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; }</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">protected</span> <span style="color: blue;">override</span> System.Collections.Generic.<span style="color: rgb43, 145, 175;">IEnumerable</span>&lt;<span style="color: blue;">string</span>&gt; GetRolesCore(<span style="color: rgb43, 145, 175;">ILoginCredential</span> credential)</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">var</span> roles = <span style="color: blue;">base</span>.GetRolesCore(credential);</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> roles;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; }</p></div><!--EndFragment--></div></div><!--EndFragment--></div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;">&nbsp;</div></div><div><font size="2" face="C&#111;nsolas">Here's what I've in the .Web log</font></div><div><font size="2" face="C&#111;nsolas"></font>&nbsp;</div><div><table ="logtable"><t><tr ="row2"><td style="white-space: nowrap;">2012-06-07</td><td>10:08:04</td><td></td><td>IdeaBlade.EntityModel.Server.EntityServerErrorInterceptor:OnError</td><td>Caught exception: LoginException: The current user is not authorized, and guest access is not allowed. ---&gt; at IdeaBlade.EntityModel.Web.AspAuthenticatingLoginManager.GetCurrentPrincipal() at IdeaBlade.EntityModel.Web.AspAuthenticatingLoginManager.NonCredentialAuthentication() at IdeaBlade.EntityModel.Web.AspAuthenticatingLoginManager.Login(ILoginCredential credential, EntityManager entityManager) at IdeaBlade.EntityModel.Server.SessionManager.GetPrincipalFromCredential(ILoginCredential pCredential) at IdeaBlade.EntityModel.Server.SessionManager.GetPrincipalFromEncryptedCredential(SessionBundle sessionBundle) at IdeaBlade.EntityModel.Server.SessionManager.GetPrincipal(SessionBundle sessionBundle, Boolean loginIfNotInMap) at IdeaBlade.EntityModel.Server.SessionManager.Validate(SessionBundle sessionBundle, Boolean loginIfNotInMap) at IdeaBlade.EntityModel.Server.SessionManager.Login(ILoginCredential credential) at IdeaBlade.EntityModel.Server.EntityServer.Login(ILoginCredential credential) at SyncInvokeLogin(Object , Object&#091;&#093; , Object&#091;&#093; ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object&#091;&#093; inputs, Object&#091;&#093;&amp; outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</td></tr></t></table></div><div style=": white; color: black; font-family: C&#111;nsolas; font-size: 10pt;"></div><div><!--EndFragment-->What am I doing wrong?? I tought I would have the Principal valorizated... </div><div>Thanks</div>]]>
   </description>
   <pubDate>Thu, 07 Jun 2012 01:15:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13781#13781</guid>
  </item> 
  <item>
   <title>Refresh and login : Are you using ASP.NET security?...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13761#13761</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 06-Jun-2012 at 10:54am<br /><br />Are you using ASP.NET security? You didn't mention that. FormsAuthenticationLoginCredential works in conjunction with ASP.NET security. If you have ASP.NET security configured, DevForce will leave authentication of the user to ASP.NET. In this case you wouldn't have your own IEntityLoginManager on the server, unless you want to customize the login further. ASP.NET security will set a cookie. With the IsPersistence flag you'll tell ASP.NET if you want the cookie to be persistent or temporary. <DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>With ASP.NET security enabled, you can silently login using null credential (LoginAsync(null)). In this case ASP.NET security will look for a cookie and if it finds it you'll be logged in and DevForce will grab the Principal from ASP.NET. If it doesn't find a cookie and you allow anonymous login you'll be logged in as Guest. In this case AuthenticationService.IsLoggedIn will return false, but AuthenticationService.Principal will return the Guest principal. This is because Principal.Identity.IsAuthenticated is false for a Guest user to indicate that you are not really authenticated. If you don't allow anonymous login, the login will fail if no cookie is found. </DIV><DIV>&nbsp;</DIV><DIV>So, for your scenario if you were to go with&nbsp;the ASP.NET security approach, when your application starts you'll attempt to silently login using null credential. If you're successfully logged in at that point (AuthenticationService.IsLoggedIn=true) you are done. If not, you'll present the user with your login form and have them login manually.</DIV><DIV>&nbsp;</DIV><DIV>Update1: Yes, you can essentially do something similar like ASP.NET security does if you are not using ASP.NET security. You can set a cookie in your LoginManager and then same as with ASP.NET, if the credential is null, your LoginManager would look for the cookie and log you in silently. Your LoginManager still needs to return a valid principal, so you must pack enough information into your cookie in order to create and return a proper principal with all the roles etc.</DIV><DIV>&nbsp;</DIV><DIV>Click on the following link to find more information on how to use ASP.NET security with DevForce.</DIV><DIV>&nbsp;</DIV><DIV><a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/security-aspnet" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/security-aspnet</A></DIV>]]>
   </description>
   <pubDate>Wed, 06 Jun 2012 10:54:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13761#13761</guid>
  </item> 
  <item>
   <title>Refresh and login :  Excuse me Marcel if I bother...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13752#13752</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 05-Jun-2012 at 11:31pm<br /><br />Excuse me Marcel if I bother you... ok for the solution you've proposed to me, but looking at my code I used the FormsAuthenticationLoginCredential class as LoginCredential...thinking that passing true as isPersistent parameter would store the cookie as well... just a question do you think it's possible to implement such a functionality in next version of ideablade? To internally create a cookie in SL application?<br><br>Thanks<br><br>Update1 : with the approach you've suggested to me I re-do the authentication silently ... isn't possible to have this at server level (I can only see a login an extension of IEntityLoginManager)? and if the cookie is set to not login again?<br><br>Thanks<br><br> <span style="font-size:10px"><br /><br />Edited by pponzano - 06-Jun-2012 at 12:09am</span>]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 23:31:58 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13752#13752</guid>
  </item> 
  <item>
   <title>Refresh and login : You check if you can find the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13744#13744</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 05-Jun-2012 at 8:37am<br /><br />You check if you can find the cookie, if so, you decrypt the credentials and attempt a direct login using those credentials. If the login fails, you display the login form to ask the user to login manually.]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 08:37:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13744#13744</guid>
  </item> 
  <item>
   <title>Refresh and login : supposed I store the cookie at...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13742#13742</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 05-Jun-2012 at 2:23am<br /><br />supposed I store the cookie at the login what have I to check for showing/not the login form?]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 02:23:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13742#13742</guid>
  </item> 
  <item>
   <title>Refresh and login :   Actually, I just realized...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13741#13741</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 05-Jun-2012 at 2:06am<br /><br />Actually, I just realized that you can't login using a session key from Silverlight, so this just got a lot more complicated. The easiest thing to do at this point is to store the user's encrypted credentials in a cookie, so you can log them in automatically.]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 02:06:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13741#13741</guid>
  </item> 
  <item>
   <title>Refresh and login : Hello Marcel, so I&amp;#039;ve do...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13740#13740</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 05-Jun-2012 at 1:44am<br /><br />Hello Marcel, <br>so I've do to something like <br><br><div style="font-family: C&#111;nsolas; font-size: 10pt; color: black; : white;"><p style="margin: 0px;"><span style="color: blue;">public</span> <span style="color: blue;">class</span> my<span style="color: #2b91af;">AuthenticationService</span> : <span style="color: #2b91af;">AuthenticationService</span>, <span style="color: #2b91af;">IUserService</span></p><p style="margin: 0px;">&nbsp; {</p><p style="margin: 0px;"><span style="color: blue;">&nbsp;&nbsp;&nbsp; &nbsp; #region</span> IUserService Members</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">bool</span> <span style="color: #2b91af;">IUserService</span>.IsLoggedIn</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">get</span> { <span style="color: blue;">return</span> Principal != <span style="color: blue;">null</span>; }</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; }</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">public</span> <span style="color: #2b91af;">IFUser</span> CurrentUser</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">get</span> { <span style="color: blue;">return</span> Principal <span style="color: blue;">as</span> <span style="color: #2b91af;">IFUser</span>; }</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; }</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;"><span style="color: blue;">&nbsp;&nbsp;&nbsp; &nbsp; #endregion</span></p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">protected</span> System.Collections.Generic.<span style="color: #2b91af;">IEnumerable</span>&lt;IdeaBlade.EntityModel.<span style="color: #2b91af;">INotifyCompleted</span>&gt; LoginAsync(<span style="color: #2b91af;">Guid</span> sessionKey)</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: green;">//todo add authentication</span></p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <span style="color: blue;">return</span> <span style="color: blue;">null</span>;</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp; }</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp;</p><p style="margin: 0px;">&nbsp; }</p><p style="margin: 0px;"><br></p><p style="margin: 0px;">Since the default will call the OperationResult LoginAsync(ILoginCredential credential, Action onSuccess = null, Action&lt;Exception&gt; onFail = null);</p><p style="margin: 0px;"><br></p><p style="margin: 0px;">need I to create a wrapping class that implements ILoginCredential and pass it to the server or at this post the whole authentication is on client? (I match my cookie session with the provided one)?</p><p style="margin: 0px;"><br></p><p style="margin: 0px;">Thanks<br></p><p style="margin: 0px;"><br></p></div><br>]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 01:44:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13740#13740</guid>
  </item> 
  <item>
   <title>Refresh and login : Hitting F5 loads a fresh instance...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13739#13739</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 05-Jun-2012 at 1:28am<br /><br />Hitting F5 loads a fresh instance of the Silverlight plug-in. It's like opening a complete new browser. You are refreshing the browser page. If you want to keep the user logged in, you have to store the SessionKey in a cookie and when your application starts you look for the cookie and try to login automatically using the SessionKey, if the login fails then you ask the user for their username/password. The SessionKey can be obtained from the AuthenticationContext on the AuthenticationService. Unfortunately, the AuthenticationService doesn't yet have a LoginAsync method that takes a SessionKey instead of a credential. So far the need hasn't come up. You'll have to subclass the AuthenticationService and add a LoginAsync(Guid) method and use the LoginAsync(Guid) overload on the DevForce Authenticator to login using the SessionKey.]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 01:28:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13739#13739</guid>
  </item> 
  <item>
   <title>Refresh and login : Hello,I&amp;#039;ve got a silverlight...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13737#13737</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3479<br /><strong>Posted:</strong> 05-Jun-2012 at 1:04am<br /><br />Hello,<br>I've got a silverlight 5 application that at the startsup shows a loginform (similar to the TempHire application),authentication works fine and children are happy :D<br><br>I've got a small problem that's when the user press F5 the browser refresh and it asks me again to login... I've tried to check at the refresh if the Principal is logged in but it's false... how can I handle this scenario?<br><br>Thanks<br><br>Paolo<br><br>On my Shell view I do<br><br><b>&nbsp; protected override void OnViewLoaded(object view)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; base.OnViewLoaded(view);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!userService.IsLoggedIn) //&lt;- always false<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PerformLogin().ToSequentialResult().Execute();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br></b>Thanks<b><br></b>]]>
   </description>
   <pubDate>Tue, 05 Jun 2012 01:04:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3479&amp;PID=13737#13737</guid>
  </item> 
 </channel>
</rss>