New Posts New Posts RSS Feed: App.Config not found
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

App.Config not found

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

Joined: 06-Mar-2009
Location: Olympia, WA
Posts: 5
Post Options Post Options   Quote shanah Quote  Post ReplyReply Direct Link To This Post Topic: App.Config not found
    Posted: 30-Mar-2009 at 5:13pm
I have created a new Silverlight application with Devforce SL, using the "NextSilverlightApp" Page.XAML as a model for the NoteSearch page. 
 
When NoteSearch.XAML connects to the EntityManager, I receive the following error:
 
Unable to locate default version of the 'app.config' file - Please contact IdeaBlade tech support
 
 
I have tried placing a copy of the app.config from the DomainModel project into the other projects in my application, and have changed the properties so the app.config is an Embedded Resource (from suggestions in Dev Manual). 
 
What is the default version of the app.config file, and where does it need to be located? 
 
Here's the stack trace:
 
IdeaBlade.Util.v4.IdeaBladeException was unhandled by user code
  Message="Unable to locate default version of the 'app.config' file - Please contact IdeaBlade tech support"
  StackTrace:
       at IdeaBlade.Util.v4.IdeaBladeConfig.DeserializeFromUtil(List`1 tryList)
       at IdeaBlade.Util.v4.IdeaBladeConfig.InitializeFromSource()
       at IdeaBlade.Util.v4.IdeaBladeConfig.Initialize()
       at IdeaBlade.Util.v4.IdeaBladeConfig.get_Instance()
       at IdeaBlade.Util.v4.IdeaBladeConfig.AssertNonDefaultVersion()
       at IdeaBlade.EntityModel.v4.EntityManager..ctor(Boolean shouldConnect, String dataSourceExtension, EntityServiceOption entityServiceOption)
       at IdeaBlade.EntityModel.v4.EntityManager..ctor(Boolean shouldConnect)
       at CaseManager.DomainModel.DomainModelEntityManager..ctor(Boolean shouldConnect)
       at CaseManager.Applet.Note.Views.NoteSearch.CreateEntityManager()
       at CaseManager.Applet.Note.Views.NoteSearch.Page_Loaded(Object sender, RoutedEventArgs e)
       at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
  InnerException:
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: 31-Mar-2009 at 9:25am
In a DevForce Silverlight client application, the app.config must be set as an embedded resource in the Silverlight application project assembly, and must also be named "app.config".   Also make sure that there are no errors in the config  file - eg, a missing end element tag or something similar which would cause the configuration not to load.
 
There is no default version, but the app.config found in any of the sample Silverlight applications is a good starting point.  Your app.config will contain edmKey and probe assembly name information specific to your own configuration. 
 
 
 
Back to Top
shanah View Drop Down
Newbie
Newbie
Avatar

Joined: 06-Mar-2009
Location: Olympia, WA
Posts: 5
Post Options Post Options   Quote shanah Quote  Post ReplyReply Direct Link To This Post Posted: 31-Mar-2009 at 2:44pm
Thanks.
Using the "NextSilverlightApp" as a guide, I created an App.config as follows:
 
<?xml version="1.0" encoding="utf-8"?>

<configuration>

<configSections>

<section name="ideaBlade.v4" type="IdeaBlade.Util.Configuration.v4.IdeaBladeSection, IdeaBlade.Util.v4" />

</configSections>

<ideaBlade.v4 version="4.00" updateFromDomainModelConfig="No" clientApplicationType="Silverlight">

<objectServer isDistributed="true" remoteBaseURL="http://localhost" serverPort="9009" serviceName="EntityService.svc" />

<edmKeys>

<edmKey name="Default">

<probeAssemblyNames>

<probeAssemblyName name="CaseManager.DomainModel.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />

<probeAssemblyName name="CaseManager.DomainModel.Server" />

<probeAssemblyName name="CaseManager.DomainModel.EF" />

</probeAssemblyNames>

</edmKey>

</edmKeys>

</ideaBlade.v4>

</configuration>

CaseManager.DomainModel.Client is the Silverlight assembly that contains linked files to the domain, CaseManager.DomainModel.Server is the assembly that contains DevForce domain objects, and the EF namespace is the project containing the EntityFramework.  I tried all three as probAssemblyName references, then each individually.  Each time I receiving the following error: 
 
"No license found after probing all assemblies in the config file - Check for valid probeAssemblyNames in the config file."
 
Where should it be pointing to find the license?
 
 
 
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: 31-Mar-2009 at 3:46pm
This is a different error than you originally received, so your app.config is now being found.  The license should be located in the "CaseManager.DomainModel.Client" assembly.  First make sure that this is in fact the assembly name - which should be the same on both the Silverlight client and the web sides, as shown in the "Next Steps" example and described in the notes.  It's possible that the actual assembly name is "CaseManager.DomainModel", while the project names have the .Client and .Server extensions.  Double check the project properties to verify the correct assembly name.
 
The "server side" assemblies - the ones suffixed with .Server and .EF - are not used within the Sillverlight application and can be removed from the probe names.
 
Chapter 9 in the Developer Guide has more information on troubleshooting a Silverlight application.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down