<?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 : Error in Implementing IDataSourceKeyResolver</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Error in Implementing IDataSourceKeyResolver</description>
  <pubDate>Wed, 29 Jul 2026 06:18:58 -700</pubDate>
  <lastBuildDate>Thu, 11 Nov 2010 17:08:28 -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=2293</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>Error in Implementing IDataSourceKeyResolver : In DevForce 2010 we register a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2293&amp;PID=9086#9086</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> 2293<br /><strong>Posted:</strong> 11-Nov-2010 at 5:08pm<br /><br />In DevForce 2010 we register a "virtual path provider" in the global.asax application startup logic to handle any requests&nbsp;to EntityService.svc or EntityServer*.svc .&nbsp; With the virtual path provider in place you don't need physical .svc files at all, so it's particularly useful when using data source extensions.&nbsp; As long as you have the global.asax logic in place, you don't need to do anything special for data source extensions, and you don't need any .svc files.]]>
   </description>
   <pubDate>Thu, 11 Nov 2010 17:08:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2293&amp;PID=9086#9086</guid>
  </item> 
  <item>
   <title>Error in Implementing IDataSourceKeyResolver : This issue is working fine now....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2293&amp;PID=9085#9085</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=913" rel="nofollow">yafei</a><br /><strong>Subject:</strong> 2293<br /><strong>Posted:</strong> 11-Nov-2010 at 4:09pm<br /><br /><P>This issue is working fine now. However, I get a few questions for the implementation of EntityService and EntityServer. In the document online&nbsp;about the EntityService and EntityServers, I find:</P><DIV><SPAN>--------------------------------------------------------------------------------</SPAN></DIV><DIV><SPAN>Extensions and EntityServers</SPAN></DIV><DIV><P style="MARGIN-TOP: 0.11in; MARGIN-BOTTOM: 0in">Let’s stick with the multi-tenant, ASP scenario for awhile.</P><P style="MARGIN-TOP: 0.11in; MARGIN-BOTTOM: 0in">When the application client determines the customer, it creates an <SPAN style="FONT-SIZE: 9pt">EntityManager</SPAN> dedicated to the data sources applicable to that customer by including the customer’s “DatasourceExtension” name in the constructor.</P><TABLE border=0 cellSpacing=0 cellPadding=7 width=638><T><TR vAlign=top><TD =#76923c width=18><strong><SPAN style="COLOR: black">C#</SPAN></strong><SPAN style="COLOR: black"></SPAN></TD><TD =#d6e3bc width=590><SPAN =" code">msManager = <SPAN style="COLOR: #0000ff">new</SPAN> DomainModelEntityManager(<SPAN style="COLOR: #0000ff">true</SPAN>, <SPAN style="COLOR: #a31515">"A"</SPAN>); <SPAN style="COLOR: #008000">// Connect to customer "A"<BR></SPAN></SPAN></TD></TR><TR style="BORDER-TOP: silver 5px solid" vAlign=top><TD =#76923c width=18><strong><SPAN style="COLOR: black">VB</SPAN></strong><SPAN style="COLOR: black"></SPAN></TD><TD =#eaf1dd width=590><SPAN =" code">msManager = <SPAN style="COLOR: #0000ff">New</SPAN> DomainModelEntityManager(<SPAN style="COLOR: #0000ff">True</SPAN>, <SPAN style="COLOR: #a31515">"A"</SPAN>) <SPAN style="COLOR: #008000">' Connect to customer "A"<BR></SPAN></SPAN></TD></TR></T></TABLE><P style="MARGIN-TOP: 0.11in; MARGIN-BOTTOM: 0in">Now the client application tries to login or fetch entities with this <SPAN style="FONT-SIZE: 9pt">EntityManager</SPAN>. The<SPAN style="FONT-SIZE: 9pt">&nbsp;EntityManager</SPAN> contacts the <SPAN style="FONT-SIZE: 9pt">EntityService</SPAN>. The <SPAN style="FONT-SIZE: 9pt">EntityService</SPAN> checks among its <SPAN style="FONT-SIZE: 9pt">EntityServers</SPAN> for one that is associated with extension “A”. It doesn’t find one so it creates a new<SPAN style="FONT-SIZE: 9pt">&nbsp;EntityServer</SPAN> instance for extension “A” and adds it to its collection. This <SPAN style="FONT-SIZE: 9pt">EntityServer</SPAN> now serves every <SPAN style="FONT-SIZE: 9pt">EntityManager</SPAN> presenting the “A” extension.</P><P style="PAGE-BREAK-AFTER: avoid; LINE-HEIGHT: 115%; MARGIN-TOP: 0.14in; MARGIN-BOTTOM: 0.06in"><SPAN style="FONT-FAMILY: Times New Roman, serif">When the&nbsp;</SPAN><SPAN style="FONT-SIZE: 0.8em"><FONT size=2>EntityService</FONT></SPAN><SPAN style="FONT-FAMILY: Times New Roman, serif">&nbsp;encounters&nbsp;</SPAN><SPAN style="FONT-SIZE: 9pt">EntityManagers</SPAN><SPAN style="FONT-FAMILY: Times New Roman, serif">&nbsp;with unknown extensions – “B” and “C” for example –, it creates more&nbsp;</SPAN><SPAN style="FONT-SIZE: 9pt">EntityServers</SPAN><SPAN style="FONT-FAMILY: Times New Roman, serif">. The three-tenant scenario could look like this:</SPAN></P></DIV><DIV>&nbsp;</DIV><DIV>-----------------------------------------------------------------</DIV><DIV>In IIS 7.0, to make all these EntityServers work, I need to create multiple files like EntityServer_A.svc, EntityServer_B.svc, EntityServer_C.svc ... etc., because my WinClient is looking for it when it create an EntityManager (with Extension A, B, C ...). Is there another way to work this out to void so many files in server side? If I have 1000 customers, should I create 1000 files in IIS ?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 11 Nov 2010 16:09:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2293&amp;PID=9085#9085</guid>
  </item> 
  <item>
   <title>Error in Implementing IDataSourceKeyResolver : It&amp;#039;s working whenI debug/runinthe...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2293&amp;PID=9070#9070</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=913" rel="nofollow">yafei</a><br /><strong>Subject:</strong> 2293<br /><strong>Posted:</strong> 10-Nov-2010 at 6:27pm<br /><br />It's working when&nbsp;I debug/run&nbsp;in&nbsp;the local machine for the IDataSourceKeyResolver.&nbsp; EDMKey has been created and returned and the EntityManager is generated without any problem. However, when I deploy to a seperate IIS 7.0 and call it from my local WinClient, the BOS server always throw exception below. It looks that the IDataSourceKeyResolver implemented class does not get the Database server&nbsp;name which are read from the configuration file.<DIV>&nbsp;</DIV><DIV>Caught exception: System.Data.EntityException: The underlying provider failed on Open. ---&gt; System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure) --- End of inner exception stack trace --- at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.HandleException(Exception e, PersistenceFailure failureType) at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.OnExecuteQuery() at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.Execute(IEntityQuery entityQuery, SessionBundle sessionBundle, IEntityServer entityServer) at IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle, IEntityQuerySurrogate surrogate) at SyncInvokeFetch(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)</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 10 Nov 2010 18:27:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2293&amp;PID=9070#9070</guid>
  </item> 
 </channel>
</rss>