| Author |
Share Topic Topic Search Topic Options
|
robdrye
Newbie
Joined: 05-Aug-2009
Posts: 22
|
Post Options
Quote Reply
Topic: Unable to connect to EntityService Posted: 22-Jun-2010 at 11:03am |
Kim -
Many thanks for your help identifying and explaining this issue. The small subset of Excel-specific AR Reports utilities we have been using did not require the Document or Chart assemblies to be present hence we did not previously include them in our solution. Regardless we would appreciate and make use of the potential feature you mention which would allow for flagging assemblies to be ignored during probing.
Thanks again.
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 14-Jun-2010 at 5:43pm |
The specific cause of the failure here is that the ActiveReports assemblies are referencing two additional assemblies which aren't present: ActiveReports.Document and ActiveReports.Chart.
In the next release we will make the code more resilient so that the services still start despite these types of errors. We've also opened a feature request to provide a means of filtering the assemblies probed.
|
 |
robdrye
Newbie
Joined: 05-Aug-2009
Posts: 22
|
Post Options
Quote Reply
Posted: 11-Jun-2010 at 11:36am |
Thanks for the confirmation Kim - I have forwarded the two ActiveReports assemblies to your email.
Is this something particular to the ActiveReports libraries or can we expect to potentially run into this issue with other 3rd party components as well?
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 11-Jun-2010 at 9:58am |
Yes, it would help if you could send us the assemblies. Email to kimj at ideablade.com.
The error is occurring when building up the MEF catalog - by default this looks at all assemblies in the bin folder. Unfortunately there's currently no way to tell this lookup to exclude certain files.
Until we get this fixed, you may be able to work around the problem by placing the AR assemblies in a subfolder and then tweaking the web.config: adding the folder to the probing path and the assemblies to the list of assemblies:
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="bin;bin/AR" /> </assemblyBinding> </runtime>
<compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="AR_Assembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=..." />
</assemblies> </compilation>
Alternately you could do the above with IdeaBlade/application assemblies and modify the MEF search path, but that's slightly more involved. If you want to try this I can supply more information.
|
 |
robdrye
Newbie
Joined: 05-Aug-2009
Posts: 22
|
Post Options
Quote Reply
Posted: 10-Jun-2010 at 12:56pm |
See stack trace below.
The issue can be recreated very easily by adding references to the ActiveReports assemblies to the Silverlight web project. I can email you the 2 assemblies if you would like to repro.
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.] System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0 System.Reflection.RuntimeModule.GetTypes() +4 System.Reflection.Assembly.GetTypes() +78 System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog() +113 System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_Parts() +7 IdeaBlade.Core.Composition.PartsCatalog.LoadCatalog() +347 IdeaBlade.Core.Composition.PartsCatalog..ctor() +37 IdeaBlade.Core.Composition.CompositionHost..ctor() +140 IdeaBlade.Core.Composition.CompositionHost.get_Instance() +165 IdeaBlade.EntityModel.Server.EntityServiceHost.get_ServiceHostEventHandler() +45 IdeaBlade.EntityModel.Server.EntityServiceHost.OnCreated() +31 IdeaBlade.EntityModel.Server.EntityServiceHost..ctor(Type serviceType, Uri[] baseAddresses) +50 IdeaBlade.EntityModel.Server.EntityServiceHostFactory.CreateHostCore(Type serviceType, Uri[] baseAddresses) +53 IdeaBlade.EntityModel.Server.EntityServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +81 System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +420 System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1440 System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +44 System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +615
[ServiceActivationException: The service '/EntityService.svc' cannot be activated due to an exception during compilation. The exception message is: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..] System.Runtime.AsyncResult.End(IAsyncResult result) +679246 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190 System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) +234 System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +355 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 10-Jun-2010 at 11:03am |
Can you post, or email, the debug log? It may have some clues to help diagnose this.
Edit - Oops, I forgot which issue I this was. Since you're getting a compilation error there won't be a debug log. Can you instead navigate via your internet browser to http:/.../EntityService.svc and then post here the contents of that page, which should (hopefully) have more information on the error.
Edited by kimj - 10-Jun-2010 at 11:06am
|
 |
robdrye
Newbie
Joined: 05-Aug-2009
Posts: 22
|
Post Options
Quote Reply
Posted: 10-Jun-2010 at 8:41am |
Kim - we have done quite a bit of troubleshooting around this issue this morning and are confident it is directly related to referencing the ActiveReports libraries. The issue is very easy to create:
1. Create a new project using the DevForce Silverlight Application template. 2. Create a domain model in the web project. 3. Instantiate, Connect the Entity Manager in MainPage.xaml - everything works fine. 4. Add references to the ActiveReports library in the web project, try again, and we begin experiencing the issues with EntityService.
5. Clean solution, remove ActiveReports references, rebuild, run and the EntityService starts working as expected again.
I can provide the ActiveReports libraries or an example project if you'd like to test out on your end.
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1391
|
Post Options
Quote Reply
Posted: 10-Jun-2010 at 8:08am |
The EntityService.svc is the first piece of DevForce engaged when a request is made to the BOS. The .svc has to be compiled by ASP.NET before the hosting code for the EntityService runs. Since you're getting a compilation error here with the .svc, no part of DevForce is actually running at this point, so probing changes won't help.
I'd be surprised if the ActiveReports assemblies were the cause of the problem -- more likely the clean was needed because assemblies were out-of-sync, or maybe cached by IIS. If you find that adding the ActiveReports assemblies back into the bin does in fact cause the problem to recur, let us know.
|
 |
robdrye
Newbie
Joined: 05-Aug-2009
Posts: 22
|
Post Options
Quote Reply
Posted: 09-Jun-2010 at 7:27pm |
After doing some additional research we have narrowed down what seems to be the source of our issue. A component of our application uses a few ActiveReports utilities on the server to generate various file outputs for the users to download. It appears to be specifically these ActiveReports assemblies causing the conflict because after cleaning the solution and removing these assemblies in a test project the EntityService starts up as expected without error. There were no issues caused by referencing these assemblies while utilizing a previous version of DevForce (5.2.6.0). Is there a configuration that can be set to flag assemblies like these to be ignored by the DevForce assembly searching/probing?
|
 |
robdrye
Newbie
Joined: 05-Aug-2009
Posts: 22
|
Post Options
Quote Reply
Posted: 09-Jun-2010 at 5:19pm |
We have not been able to login the EntityManager in our project after upgrading to 6.0.3. When browsing to http://localhost:9009/EntityService.svc we encounter the following Exception:
[ServiceActivationException: The service '/EntityService.svc' cannot be activated due to an exception during compilation. The exception message is: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..]
We have confirmed that all IdeaBlade assembly references have CopyLocal set to true in the projects. We have also removed the Silverlight config file and minimized our web.config per the updated requirements:
< ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">
<!-- Uncomment this to generate the DevForce trace log -->
< logging logFile="log\DebugLog.xml" />
</ ideablade.configuration>
< system.serviceModel>
<!-- Set this to true to allow use of ASP.NET security features.-->
< serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
|
 |