New Posts New Posts RSS Feed: EntityService not connecting
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

EntityService not connecting

 Post Reply Post Reply
Author
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Topic: EntityService not connecting
    Posted: 06-Jul-2010 at 8:57pm
I'm not familiar with Devart, but it appears you call that when the application is initailizing before any persistence operations are performed.
 
There's also the EntityManagerCreated event, but it doesn't seem like you'd want to call that more than once per application instance.
 
Back to Top
midnit View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-Jun-2009
Location: Charlotte
Posts: 112
Post Options Post Options   Quote midnit Quote  Post ReplyReply Direct Link To This Post Posted: 05-Jul-2010 at 9:22am
Ok, adding the model references to the shell application has fixed the known types error. Now on to the next error! :)
 
In the 2009 version we used the OnContextCreated partial to set a needed value. This same set of code does not work in 2010. Where do I need to put this code now or where can I find the ObjectContext to use the same method?
 
namespace Png.GcsAg.Model.Jurisdiction
{
    public partial class Entities
    {
        partial void OnContextCreated()
        {
            Devart.Data.Oracle.Entity.OracleEntityProviderServices.TypedNulls = true;
        }
    }
}
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 04-Jul-2010 at 6:08pm
At this time, your domain model(s) must be located in the main application XAP.  DevForce does "known type" initialization based on types in your model, and does this only once based on the models in that main XAP.  We are looking at changing this.
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 02-Jul-2010 at 9:05pm
If you're including an app.config or ServicerReferences.ClientConfig on the client-side can you confirm their build action is set to 'Content' or 'Embedded Resource' (maybe try both)?  They should be in the startup assembly that contains the code for Application_Startup().
 
(Note that for simple deployments you don't need any config files on the client or the .svc files on the server.  Also, make sure you're using DevForce 6.0.3.1)
 
If that's not it, I'd start from the DevForce Silverlight Template and incrementally modify the deployment to suit your needs.  It has all the basic settings correct when it's first created.  I also have a sample project which breaks the model out into a separate assembly on the client and server (note that the model assembly names must be the same on both ends - this restriction will be relaxed in 6.0.4).  You can get that sample here:
 
If you're still stuck we'll need to take a look at your configuration files.
 
Back to Top
midnit View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-Jun-2009
Location: Charlotte
Posts: 112
Post Options Post Options   Quote midnit Quote  Post ReplyReply Direct Link To This Post Posted: 02-Jul-2010 at 9:35am
We have a Shell silverlight application that loads the individual silverlight application modules. Which of those is considered the "client" that the config data needs to go into?
Back to Top
midnit View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-Jun-2009
Location: Charlotte
Posts: 112
Post Options Post Options   Quote midnit Quote  Post ReplyReply Direct Link To This Post Posted: 02-Jul-2010 at 8:23am
Well after a lot of messing around in the configs I got past that error and have moved on to another one.
"There was an error while trying to serialize parameter http://ideablade.com/EntityModel:entityQuerySurrogate. The InnerException message was 'Type 'IdeaBlade.EntityModel.EntityQueryProxy`1[[Png.GcsAg.Model.Common.SecAppUser, Png.GcsAg.Model.CommonSL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' with data contract name 'EntityQueryProxyOfSecAppUser_SWPOidsL:http://ideablade.com/EntityModel' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details"
 
What can I check to track down this error?
Back to Top
midnit View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22-Jun-2009
Location: Charlotte
Posts: 112
Post Options Post Options   Quote midnit Quote  Post ReplyReply Direct Link To This Post Posted: 01-Jul-2010 at 11:32pm
I am getting your canned "There is no endpoint listening on http://localhost:9009/EntityService.svc that could accept calls from this application. If running in Visual Studio, make sure CopyLocal=true is set for all IdeaBlade assembly references in the web project to ensure that these assemblies are copied to the bin folder. To check if the service is running, open your internet browser and navigate to 'http://localhost:9009/EntityService.svc'. If the service page shows errors, these should help diagnose the problem with the service. If the service is running, then also make sure that the endpoint bindings match between client and server, and that the server's ClientApplicationType is either 'Silverlight' or 'Both'.  Check the server's debug log file for more information." error message.
 
I have checked everything mentioned and have gone over the configs several times but since this is "all new" compared to the previous version I am not familiar with it. I am upgrading a large solution in which we used your 2009 product. If I browse straight to EntityService.svc I get no error messages. All references in the web project are set to copy local.
 
I have a class library with the model, then a silverlight library with the SL portion. I recreated these models, I did not try to "upgrade" but I did create these projects manually with no templates as those didnt meet my needs. I have looked over the Deployment sections in the learning resource and some of the info is a bit confusing on which projects the files belong in in my scenario and/or which data needs to match in the different projects.
 
I also have two models with different EntityManager names. I have no added any EDM keys yet and I am not sure which config files they belong in.
 
Please help me clear up this fog, we are very anxious to get 2010 up and running!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down