<?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 : DataSourceKeyResolver</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : DataSourceKeyResolver</description>
  <pubDate>Sun, 12 Apr 2026 06:00:10 -700</pubDate>
  <lastBuildDate>Mon, 26 Sep 2011 06:45:03 -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=2970</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>DataSourceKeyResolver :   here is my DevForce logfile...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11707#11707</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1090" rel="nofollow">rickadams</a><br /><strong>Subject:</strong> 2970<br /><strong>Posted:</strong> 26-Sep-2011 at 6:45am<br /><br />here is my DevForce logfile<div>&nbsp;</div><div><img src="uploads/1090/DevForce_LogFile.png" height="600" width="1736" border="0" /></div>]]>
   </description>
   <pubDate>Mon, 26 Sep 2011 06:45:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11707#11707</guid>
  </item> 
  <item>
   <title>DataSourceKeyResolver :   I am not hitting the server...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11701#11701</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1090" rel="nofollow">rickadams</a><br /><strong>Subject:</strong> 2970<br /><strong>Posted:</strong> 23-Sep-2011 at 1:48pm<br /><br />I am not hitting the server at all so there are no log entries on the server side. I get an exception thrown on the Silverlight client. If I remove the DataSourceExtension in the constructor it will connect but of course will not pass the DataSource Extension key]]>
   </description>
   <pubDate>Fri, 23 Sep 2011 13:48:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11701#11701</guid>
  </item> 
  <item>
   <title>DataSourceKeyResolver :   Check debug logs what they...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11700#11700</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1264" rel="nofollow">katit</a><br /><strong>Subject:</strong> 2970<br /><strong>Posted:</strong> 23-Sep-2011 at 1:22pm<br /><br />Check debug logs what they say.<div></div><div></div>Also, when you run this - do you hit breakpoint on your KeyResolver? Do you see "PROD" in there? Do you return proper entity connection string?]]>
   </description>
   <pubDate>Fri, 23 Sep 2011 13:22:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11700#11700</guid>
  </item> 
  <item>
   <title>DataSourceKeyResolver :   believe I have come up with...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11699#11699</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1090" rel="nofollow">rickadams</a><br /><strong>Subject:</strong> 2970<br /><strong>Posted:</strong> 23-Sep-2011 at 1:14pm<br /><br />believe I have come up with a solution for the Server side code to do connection string lookup based on the DataSourceKey. However, now when i create my EntityManager in my silverlight client<div>&nbsp;</div><div>mgrUserConfig&nbsp;=&nbsp;<span style="color: blue;">new</span>&nbsp;<span style="color: rgb43, 145, 175;">UserConfigEntities</span>(<span style="color: blue;">true</span>,<span style="color: rgb163, 21, 21;">"PROD"</span>);</div><div>&nbsp;</div><div>it now generates an error "Unable to connect to EntityServer. Unable to start EntityServer_PROD" when it tries to connect. I don't believe this is the documented behaviour. Is this a bug in the 6.1.2 code or am I missing something here.</div><div>&nbsp;</div><div>Thanks</div><pre style=": white; color: black; font-family: C&#111;nsolas;">&nbsp;</pre>]]>
   </description>
   <pubDate>Fri, 23 Sep 2011 13:14:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11699#11699</guid>
  </item> 
  <item>
   <title>DataSourceKeyResolver :   I just went through this with...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11697#11697</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1264" rel="nofollow">katit</a><br /><strong>Subject:</strong> 2970<br /><strong>Posted:</strong> 21-Sep-2011 at 1:58pm<br /><br />I just went through this with IdeaBlade support. Tried to do exact same thing. And their code sample shows how you get connection string using regular EF4 context :)<div>&nbsp;</div><div>This is response I got:</div><div>&nbsp;</div><div><span style='font-family: "Times New Roman","serif"; font-size: 12pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA;'>I'd suggest thatinstead of trying this approach, you actually created the EM after entering thelogin information. <br>i.e. <br>1) Login UI: user enters accountID, username, and password. Click login.<br>2) create EM: var manager = new IDATTApplicationEntities(true, accountID);<br>3) login: manager.LoginAsync(credentials);<br style="mso-special-character: line-break;"><br style="mso-special-character: line-break;"><font size="2" face="Verdana">Basically, after you figure out that you need to pass blank EM into constructor you will get into limitation where your DataSourceKeyResolver won't get keyExtension</font></span></div>]]>
   </description>
   <pubDate>Wed, 21 Sep 2011 13:58:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11697#11697</guid>
  </item> 
  <item>
   <title>DataSourceKeyResolver :   I wish to implement a DataSourceKeyResolver...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11696#11696</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1090" rel="nofollow">rickadams</a><br /><strong>Subject:</strong> 2970<br /><strong>Posted:</strong> 21-Sep-2011 at 1:42pm<br /><br />I wish to implement a DataSourceKeyResolver on my DevForce BOS. I have created the class which implements <span style="color: rgb43, 145, 175;">IDataSourceKeyResolver.&nbsp;<font color="#000000">wish This class &nbsp;will lookup the Database connection string in the Database and return the connection string based on the keyName and keyExtension. I wish to use a DevForce Entitymanager to return the required connection string. My application does not allow anonymous access so i must use an authenticated EM to perform the query. I don't seem to able to create the EM on the server side that is logged in. I must be missing something obvious here so would you mind showing me the code required to perform this.&nbsp;Here is my current code that is not working<div></div><div></div><pre style=": white; color: black; font-family: C&#111;nsolas;">&nbsp;&nbsp;&nbsp;<span style="color: blue;">private</span>&nbsp;<span style="color: blue;">static</span>&nbsp;<span style="color: rgb43, 145, 175;">String</span>&nbsp;GetConnectionString(<span style="color: blue;">string</span>&nbsp;keyName,&nbsp;<span style="color: blue;">string</span>&nbsp;keyExtension)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">try</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb43, 145, 175;">Log</span>.Information(<span style="color: rgb163, 21, 21;">"LEAF_DataKeyResolver"</span>,&nbsp;<span style="color: rgb163, 21, 21;">"GetConnectionString"</span>,&nbsp;keyName&nbsp;+&nbsp;<span style="color: rgb163, 21, 21;">"&nbsp;&nbsp;+&nbsp;&nbsp;"</span>&nbsp;+&nbsp;keyExtension);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb43, 145, 175;">ConfigInfoEntities</span>&nbsp;context&nbsp;=&nbsp;<span style="color: blue;">new</span>&nbsp;<span style="color: rgb43, 145, 175;">ConfigInfoEntities</span>(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb43, 145, 175;">LEAFConfig_DocumentDatabases</span>&nbsp;connection&nbsp;=&nbsp;context.LEAFConfig_DocumentDatabases&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Where(c&nbsp;=&gt;&nbsp;c.DatabaseName&nbsp;==&nbsp;keyExtension)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.First(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb43, 145, 175;">Log</span>.Information(<span style="color: rgb163, 21, 21;">"LEAF_DataKeyResolver"</span>,&nbsp;<span style="color: rgb163, 21, 21;">"GetConnectionString"</span>,&nbsp;connection.ConnectionString); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">return</span>&nbsp;connection.ConnectionString;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">catch</span>&nbsp;(<span style="color: rgb43, 145, 175;">Exception</span>&nbsp;ex)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb43, 145, 175;">Log</span>.Error(<span style="color: rgb163, 21, 21;">"LEAF_DataKeyResolver"</span>,&nbsp;<span style="color: rgb163, 21, 21;">"GetConnectionString"</span>,&nbsp;ex.Message);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">return</span>&nbsp;<span style="color: rgb163, 21, 21;">""</span>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;}</pre></font></span>]]>
   </description>
   <pubDate>Wed, 21 Sep 2011 13:42:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2970&amp;PID=11696#11696</guid>
  </item> 
 </channel>
</rss>