New Posts New Posts RSS Feed: Unable to locate type
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Unable to locate type

 Post Reply Post Reply
Author
bstearns View Drop Down
Newbie
Newbie


Joined: 27-Jul-2010
Posts: 5
Post Options Post Options   Quote bstearns Quote  Post ReplyReply Direct Link To This Post Topic: Unable to locate type
    Posted: 15-Nov-2010 at 11:42am
Hello
 
 
I am having a problem where my entity service is throwing this error when I call it from a silverlight client.  I am using Devforce universal 6.0.6
 
Caught exception: System.Exception: Unable to locate type: SomeName.DomainModel.Country, SomeName.DomainModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null at IdeaBlade.Core.TypeWrapperSL.FindType() at IdeaBlade.Core.TypeWrapperSL.Restore() at IdeaBlade.Core.TypeWrapperSL.get_Type() at  .........
 
There is the two different domain models, the main domain model and then the silverlight domain model that links in the business objects from the domain model.  Both of these asseblies live in the same namespace SomeName.DomainModel but the assemblies are named differently SomeName.DomainModel vs SomeName.DomainModel.SL.  Which to my understanding is OK since 6.0.4.
 
In the old documentation there was a bit about the assembly namespaces not matching so I went back with reflector and checked this.  Through reflector I can see that in both assemblies the Country type has the exact same namespace and version number. 
 
If anyone can point me in the right direction to fix this it would be apprcieated.
 
Thanks
B
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: 15-Nov-2010 at 1:26pm
I don't have an immediate answer, but here are some things to look for or double-check:
 
 - Make sure that the domain model assemblies are actually deployed:  the SL assembly should  be in the application XAP, and the .NET assembly in the bin folder of the web application.
 
- Out-of-sync assemblies, either DevForce or your own.  (This really is always worth double checking :) ).
 
- If types in the SL assembly point to multiple .NET assemblies.  For example, the Country type might point to SomeName.DomainModel, while the State type points to a different assembly. 
Back to Top
bstearns View Drop Down
Newbie
Newbie


Joined: 27-Jul-2010
Posts: 5
Post Options Post Options   Quote bstearns Quote  Post ReplyReply Direct Link To This Post Posted: 16-Nov-2010 at 11:43am

Thanks for the reply. 

As you hinted at the issue had to do with the domain model not getting deployed with the web application.  Make sure that it gets deployed properly and works as advertised.
 
Thanks
B
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down