Print Page | Close Window

Exception in EntityManager constructor

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2024
Printed Date: 21-Apr-2026 at 10:29pm


Topic: Exception in EntityManager constructor
Posted By: jeejee
Subject: Exception in EntityManager constructor
Date Posted: 28-Jul-2010 at 8:44am
Hi,
 
I am receiving several errors when I attempt to start my application. The application eventually works but I think the undermentioned errors are causing some errors in the designer.
 
I am using Devforce 2010 6.0.4.0 in a Silverlight application.
 
My application is split into 4 projects:
DomainModel (the project containing the domain model)
DomainModelSL (the project containing the linked files to the domain model for use in the SL project)
JTS2 (the Client Silverlight app)
JTS2Web (the Web project)
 
I only have one app.config (in the DomainModel project) and it contains:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core, Version=6.0.4.0, Culture=neutral, PublicKeyToken=287b5094865421c0" />
  </configSections>
  <connectionStrings>
    <add name="JTS2Entities" connectionString="metadata=res://*/JTS2Model.csdl|res://*/JTS2Model.ssdl|res://*/JTS2Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=localhost\sqlexpress;Initial Catalog=JTS2;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <objectServer isDistributed="true" remoteBaseURL="http://localhost" serverPort="80" serviceName="JTS2/EntityService.svc" />
  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">
    <logging logFile="DebugLog.xml" />
    <objectServer remoteBaseURL="http://localhost" serverPort="9009" serviceName="EntityService">
      <serverSettings supportedClientApplicationType="Silverlight" loginManagerRequired="true" sessionEncryptionKey="0FEBFBFF000106E5000c297ebf18" useAspNetSecurityServices="true" />
    </objectServer>
  </ideablade.configuration>
</configuration>
The web app Web.config looks as follows:
<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core"/>
  </configSections>
  <connectionStrings>
    <add name="JTS2Entities" connectionString="metadata=res://*/JTS2Model.csdl|res://*/JTS2Model.ssdl|res://*/JTS2Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=localhost\SQLEXPRESS;Initial Catalog=JTS2;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="data source=localhost\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=JTS2;" providerName="System.Data.SqlClient"/>
  </connectionStrings>

  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig" >
    <logging logFile="log\DebugLog.xml"/>
    <!-- Additional configuration can be added to override defaults. 
        See the sample config files in the Learning Resources for more information.
    -->
    <objectServer>
      <serverSettings useAspNetSecurityServices="true" />
    </objectServer>
  </ideablade.configuration>

  <system.serviceModel>
    <!-- Set this to true to allow use of ASP.NET security features. -->
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

    <!-- You can add Service definitions to override the default configuration. 
         See the sample config files in the Learning Resources for more information.
    -->
  </system.serviceModel>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <authentication mode="Forms" />
    <!-- Set to enable/disable the ASP.NET Role Manager. -->
    <roleManager enabled="true" />
    <!-- Set to enable and configure the ASP.NET Profile. These are sample properties. -->
    <profile enabled="true">
      <properties>
        <add name="FriendlyName" />
      </properties>
    </profile>
  </system.web>
</configuration>
 
I receive the following errors:
System.Xml.XmlException occurred
  Message=Cannot find file 'app.config' in the application xap package.
  LineNumber=0
  LinePosition=0
  StackTrace:
       at System.Xml.XmlXapResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
  InnerException:

Additional Information:
When you hit F5 and continue with the project it then gives two more errors before 
 
---------------------- Then 
System.IO.FileNotFoundException occurred
  Message=Could not load file or assembly 'System.ServiceModel.Extensions, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
  StackTrace:
       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
  InnerException:

---------------------- Then 
System.Xml.XmlException occurred
  Message=Cannot find file 'ServiceReferences.ClientConfig' in the application xap package.
  LineNumber=0
  LinePosition=0
  StackTrace:
       at System.Xml.XmlXapResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
  InnerException:

---------------------- Then 
System.IO.FileNotFoundException occurred
  Message=Could not load file or assembly 'IdeaBlade.Core.XmlSerializers, Version=6.0.4.0, Culture=neutral, PublicKeyToken=287b5094865421c0' or one of its dependencies. The system cannot find the file specified.
  Source=mscorlib
  FileName=IdeaBlade.Core.XmlSerializers, Version=6.0.4.0, Culture=neutral, PublicKeyToken=287b5094865421c0
  FusionLog==== Pre-bind state information ===
LOG: User = STRONGCO-XP1\jeejee
LOG: DisplayName = IdeaBlade.Core.XmlSerializers, Version=6.0.4.0, Culture=neutral, PublicKeyToken=287b5094865421c0, processorArchitecture=MSIL
 (Fully-specified)
LOG: Appbase =
file:///C:/SilverLightProjects/JTS2/JTS2Web/ - file:///C:/SilverLightProjects/JTS2/JTS2Web/
LOG: Initial PrivatePath = C:\SilverLightProjects\JTS2\JTS2Web\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\SilverLightProjects\JTS2\JTS2Web\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: IdeaBlade.Core.XmlSerializers, Version=6.0.4.0, Culture=neutral, PublicKeyToken=287b5094865421c0, processorArchitecture=MSIL
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary - file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/b8307c95/3011edba/IdeaBlade.Core.XmlSerializers.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary - file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/b8307c95/3011edba/IdeaBlade.Core.XmlSerializers/IdeaBlade.Core.XmlSerializers.DLL.
LOG: Attempting download of new URL
file:///C:/SilverLightProjects/JTS2/JTS2Web/bin/IdeaBlade.Core.XmlSerializers.DLL - file:///C:/SilverLightProjects/JTS2/JTS2Web/bin/IdeaBlade.Core.XmlSerializers.DLL .
LOG: Attempting download of new URL
file:///C:/SilverLightProjects/JTS2/JTS2Web/bin/IdeaBlade.Core.XmlSerializers/IdeaBlade.Core.XmlSerializers.DLL - file:///C:/SilverLightProjects/JTS2/JTS2Web/bin/IdeaBlade.Core.XmlSerializers/IdeaBlade.Core.XmlSerializers.DLL .
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary - file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/b8307c95/3011edba/IdeaBlade.Core.XmlSerializers.EXE.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary - file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/b8307c95/3011edba/IdeaBlade.Core.XmlSerializers/IdeaBlade.Core.XmlSerializers.EXE.
LOG: Attempting download of new URL
file:///C:/SilverLightProjects/JTS2/JTS2Web/bin/IdeaBlade.Core.XmlSerializers.EXE - file:///C:/SilverLightProjects/JTS2/JTS2Web/bin/IdeaBlade.Core.XmlSerializers.EXE .
LOG: Attempting download of new URL
file:///C:/SilverLightProjects/JTS2/JTS2Web/bin/IdeaBlade.Core.XmlSerializers/IdeaBlade.Core.XmlSerializers.EXE - file:///C:/SilverLightProjects/JTS2/JTS2Web/bin/IdeaBlade.Core.XmlSerializers/IdeaBlade.Core.XmlSerializers.EXE .
  StackTrace:
       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
  InnerException:

---------------------- Then
System.ArgumentException occurred
  Message=URI formats are not supported.
  Source=mscorlib
  StackTrace:
       at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
  InnerException:

Other errors are also displayed (I can include them for you if you require) but eventually the application 
starts running and works correctly.
 
Please could you help me in identifying why I am getting these errors.
 
Thanks
Jeejee



Replies:
Posted By: kimj
Date Posted: 05-Aug-2010 at 11:35am
The errors you see are all handled internally, either by DevForce or within the .NET framework.  You'll see these exceptions when debugging in Visual Studio and you've turned on the flag to throw for all exceptions.   These errors are all innocuous, and if you don't want to see them during a debugging session you can turn off the "throw on all exceptions" flag or specifically turn the throw flag off for these exceptions.



Print Page | Close Window