<?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 : Authenticator.Instance.LoginAsync</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : Authenticator.Instance.LoginAsync</description>
  <pubDate>Wed, 15 Apr 2026 18:56:49 -700</pubDate>
  <lastBuildDate>Fri, 16 Aug 2013 11:27:42 -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=4275</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>Authenticator.Instance.LoginAsync : Perfect. Not only did the await...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4275&amp;PID=16736#16736</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=2190" rel="nofollow">energysaver</a><br /><strong>Subject:</strong> 4275<br /><strong>Posted:</strong> 16-Aug-2013 at 11:27am<br /><br />Perfect. Not only did the await timeout as directed, but the resulting exception text identified the exact cause of the login failure.<br><br>Thanks!]]>
   </description>
   <pubDate>Fri, 16 Aug 2013 11:27:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4275&amp;PID=16736#16736</guid>
  </item> 
  <item>
   <title>Authenticator.Instance.LoginAsync : The LoginAsync call should have...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4275&amp;PID=16735#16735</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 4275<br /><strong>Posted:</strong> 16-Aug-2013 at 11:02am<br /><br />The LoginAsync call <EM>should</EM> have thrown, although the automatic retry logic may have kicked in making it look like a hang.&nbsp; We can look further at that. <DIV sab="958">&nbsp;</DIV><DIV sab="959">You can pass a CancellationToken with the call.&nbsp; This will cancel if the login call doesn't complete within 10 seconds:</DIV><DIV sab="960">&nbsp;</DIV><DIV sab="961">ILoginCredential credential = null;</DIV><DIV sab="961">var cts = new CancellationTokenSource();<BR>cts.CancelAfter(TimeSpan.FromSeconds(10));</DIV><DIV sab="961">var ctxAuth = await Authenticator.Instance.LoginAsync(credential: credential, options: null, cancellationToken: cts.Token);<BR sab="963"></DIV>]]>
   </description>
   <pubDate>Fri, 16 Aug 2013 11:02:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4275&amp;PID=16735#16735</guid>
  </item> 
  <item>
   <title>Authenticator.Instance.LoginAsync :    My DevForce-enabled Silverlight...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4275&amp;PID=16734#16734</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=2190" rel="nofollow">energysaver</a><br /><strong>Subject:</strong> 4275<br /><strong>Posted:</strong> 16-Aug-2013 at 9:58am<br /><br />My DevForce-enabled Silverlight app was hanging on this call:<br><br><b>ILoginCredential credential = null;<br>var ctxAuth = await Authenticator.Instance.LoginAsync(credential);</b><br><br>Turns out I had an invalid database name in a connection string in my web.config. Thankfully, DevForce added the entry below to the log file file or I would have had no idea why it was hanging.<br><br>I want to timeout the call to the LoginAsync method (e.g., stop AWAITing) after a specified time period elapses. What is the best way to do this?<br><br>Thanks in advance.<br><br>------------------<br><br>&lt;entry id="53" timestamp="2013-08-16T09:50:33" username="Guest - 1" source="IdeaBlade.EntityModel.Server.EntityServerErrorInterceptor:OnError"&gt;Caught exception: System.Data.EntityException: The underlying provider failed on Open. ---&amp;gt; System.Data.SqlClient.SqlException: <b>Cannot open database "MyDatabase" requested by the login. The login failed.</b><br>Login failed for user 'MyUser'.<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)<br>&nbsp;&nbsp; at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)<br>&nbsp;&nbsp; at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp;amp; dataReady)<br>&nbsp;&nbsp; at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)<br>&nbsp;&nbsp; at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)<br>&nbsp;&nbsp; at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)<br>&nbsp;&nbsp; at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)<br>&nbsp;&nbsp; at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&amp;amp; connection)<br>&nbsp;&nbsp; at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal&amp;amp; connection)<br>&nbsp;&nbsp; at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp;amp; connection)<br>&nbsp;&nbsp; at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)<br>&nbsp;&nbsp; at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)<br>&nbsp;&nbsp; at System.Data.SqlClient.SqlConnection.Open()<br>&nbsp;&nbsp; at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp;amp; closeStoreConnectionOnFailure)<br>&nbsp;&nbsp; --- End of inner exception stack trace ---<br>&nbsp;&nbsp; at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.HandleException(Exception e, PersistenceFailure failureType)<br>&nbsp;&nbsp; at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.OnExecuteQuery()<br>&nbsp;&nbsp; at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.Execute(IEntityQuery entityQuery, SessionBundle sessionBundle, IEntityServer entityServer)<br>&nbsp;&nbsp; at IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle, IEntityQuerySurrogate surrogate)<br>&nbsp;&nbsp; at SyncInvokeFetch(Object , Object&#091;&#093; , Object&#091;&#093; )<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object&#091;&#093; inputs, Object&#091;&#093;&amp;amp; outputs)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp;amp; rpc)<br>&nbsp;&nbsp; at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)&lt;/entry&gt;&nbsp;<span style="font-size:10px"><br /><br />Edited by energysaver - 16-Aug-2013 at 10:00am</span>]]>
   </description>
   <pubDate>Fri, 16 Aug 2013 09:58:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4275&amp;PID=16734#16734</guid>
  </item> 
 </channel>
</rss>