New Posts New Posts RSS Feed: Multiple Databases, Different Locations
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Multiple Databases, Different Locations

 Post Reply Post Reply
Author
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Topic: Multiple Databases, Different Locations
    Posted: 07-May-2012 at 10:11pm
Hi Silvio,

Wahoo....I can confirm it's fixed and working fine in 6.1.7.....Thanks

Regards
Marcus
Back to Top
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Posted: 07-May-2012 at 7:03pm
Hi Silvio,

Thanks for checking in the newer version, I'll update and see if the problem disappears...I do have the cross domain xml files in our production app just forgot to put them in the sample app. Cheers...

Regards
Marcus
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 07-May-2012 at 6:14pm
Hi Marcus,
 
I did find an error, but not the error you stated.
The good news is that the issue I saw in DevForce6.1.0 is not present in DevForce6.1.7 and in the latter I was able to run the application with no issues.
 
One thing to be aware of is that you will need the client access policy and cross domain xml files in your wwwroot directory in order to avoid Silverlight Cross Domain errors. (more info on that at http://forums.silverlight.net/t/63112.aspx)
 
Regards,
   Silvio.
Back to Top
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Posted: 07-May-2012 at 4:52pm
Hi Silvio,

Have you had any luck?

Regards
Marcus
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 07-May-2012 at 8:50am
Thanks for the repro. I am checking it now.
 
Silvio.
Back to Top
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Posted: 07-May-2012 at 12:23am
Hi Guys, 

It's been a while, and I've spent far too long on this issue so I've put a very basic standard Northwind demo app together that illustrates the problem of using multiple entity managers from different locations in a Silverlight application. The sample app is simply an addition to the basic Devforce getting started app. I'm using Devforce 2010 v 6.1.0. Please re-read previous posts on this issue, I now think it's a Devforce bug? Please prove me wrong!!

I really hope that by looking at the code, you'll see an obvious oversight, I've tried every combination of config file tweak under the sun. PLEASE PLEASE PLEASE help me resolve this issue, it's the only thing stopping the business that I work for buying a Devforce License....

http://www.ideablade.com/forum/uploads/1223/SilverlightApplication2Web.zip

Regards


Back to Top
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Posted: 19-Apr-2012 at 3:45pm
Hi Silvio, I'm using IIS and also have it running in my dev environment...

Regards
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 18-Apr-2012 at 11:30pm
Hi Lemispaid.
 
Were you initially trying to run on Cassini?
You should be using IIS as Cassini won't support this.
 
Regards,
   Silvio.


Edited by sbelini - 19-Apr-2012 at 12:13pm
Back to Top
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Posted: 18-Apr-2012 at 10:51pm
OK, a little more on this. I created a Console app that successfully connects to the BOS and queries the data fine. It seems that once this occurs the Silverlight app can then connect and query fine. The debug log on the server initially only shows that it's listening for the EntityService.svc but not the EntityServer.svc. It's not until I run the console app that both are listening, then the silverlight app can login and use it. It's like the Silverlight login doesn't initialize the EntityServer? I'm confused? 

I remember reading something that said the EntityServer is available after the EntityService? Any help greatly appreciated...

Regards
Back to Top
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Posted: 17-Apr-2012 at 10:54pm
Sorry guys, I jumped the gun a little. It seems that my previous post resolved merely the ability to define multiple objectServers in the App.Config. When I try to log into the second EntityManager with the address I specify in the file, I get the following error;

"System.ServiceModel.CommunicationException: The remote server returned an error: NotFound"

Now I can resolve the service using http://localhost:9100/EntityService.svc it's running as expected. My App.Config is as follows;

<configuration>
  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig" >
    
    <objectServer remoteBaseURL="http://localhost" serviceName="EntityService.svc" serverPort="9010">
      <clientSettings isDistributed="true"/>
      <serviceKeys>
         <serviceKey name="westvic" remoteBaseURL="http://localhost" serviceName="EntityService.svc/sl" serverPort="9100"/>
      </serviceKeys>
    </objectServer>
    
  </ideablade.configuration>
</configuration>

I have clientaccesspolicy.xml in place, that resolved an earlier error, but I simply can't work out how to get this working after spending at least 15 hours trying to resolve it. Here's some extra info from fiddler;

#ResultProtocolHostURLBodyCachingContent-TypeProcessCommentsCustom
13200HTTPlocalhost:9010/EntityServer.svc/sl18,678private application/x-gzipiexplore:7652
14200HTTPlocalhost:9010/EntityServer.svc/sl1,206private application/x-gzipiexplore:7652
15200HTTPlocalhost:9010/EntityServer.svc/sl961private application/x-gzipiexplore:7652
16200HTTPlocalhost:9010/EntityService.svc/sl267private application/x-gzipiexplore:7652
17200HTTPlocalhost:9100/clientaccesspolicy.xml335private text/xmliexplore:7652
18500HTTPlocalhost:9100/EntityServer.svc/sl0private iexplore:7652
19200HTTPlocalhost:9010/EntityService.svc/sl135private application/x-gzipiexplore:7652
20500HTTPlocalhost:9100/EntityServer.svc/sl0private iexplore:7652
21200HTTPlocalhost:9010/EntityService.svc/sl135private application/x-gzipiexplore:7652

Regards

Back to Top
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Posted: 16-Apr-2012 at 6:17pm
Hi Guys,

A quick update, after looking at the links you provided I was able to achieve what I wanted by placing <objectServer> in the app.config in the Silverlight Shell and by setting its Build Action to Embedded Resource.  Thanks for your help...

Regards
Back to Top
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Posted: 12-Apr-2012 at 8:41pm
Thanks Silvio, let me try to explain.

We have an application that allows employees to create timesheets online in an ASP.Net application, I'm currently porting to Silverlight. The application itself will be hosted on Azure and get the majority of it's data from an online Azure database. However, the application will also get data from our clients accounting package so we currently have a Web Service running on our clients own IIS servers that has relevant methods for reading and writing back to the accounting package. I'm wanting to get rid of the Web Service and replace with a Devforce BOS.

Therefore, when an employee logs into the Silverlight App, they belong to a Tenant (multi tenanted database) and the Tenant will have a URL to their own IIS server hosting the Devforce BOS. Sorry that's the best way to explain it :)

Therefore, we have two Entity Managers, one will be static and be the same address, the other will be dynamic and require a different endpoint based on who logs in. 

Hope that helps. In the meantime, I'll take a look at the links you've provided.

Regards
Lemispaid
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 12-Apr-2012 at 3:40pm
Hi Lemispaid,
 
Can you explain in detail what you are trying to accomplish? Are you trying to connect to one BOS and then connect to another?
 
Also, have you taken a look in the DevForce Resource Center at:
 
Regards,
   Silvio.
Back to Top
Lemispaid View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2011
Location: Australia
Posts: 12
Post Options Post Options   Quote Lemispaid Quote  Post ReplyReply Direct Link To This Post Posted: 11-Apr-2012 at 11:01pm
Devforce 2010 Universal

Hi there, I have an interesting scenario that's I'm struggling with. We have a Silverlight app that uses 2 separate databases. The app predominantly uses a small sql database, but it also needs access a larger sql database hosted at a different location. Therefore, I've got my project setup with two Entity Models and two Entity Managers which works fine, however, I need to be able to change the EndPoint on one of the Managers once a user logs in because we'll then know the location of the Entity Service (BOS) running on a clients own IIS server. 

I've tried implementing my own ServiceProxyEvents and this isn't working as expected. 

In a nutshell the app gets its data from two different BOS but I can't seem to get this working? Any ideas appreciated... 

Regards

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down