Print Page | Close Window

Question about Silverlight application debug

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=1854
Printed Date: 21-Apr-2026 at 12:19pm


Topic: Question about Silverlight application debug
Posted By: ehsan
Subject: Question about Silverlight application debug
Date Posted: 02-Jun-2010 at 12:48am
Hi
I'm new in devforce & i've created a simple project using devforce 2010 for silverlight 4 (I've created my project using devforce silverlight application template).
Then i added a simple data object to my web application using entity data model wizard. this model has created successfully & devforce is integrated with it as shown in develpement guide. my entity container name (as my entity manager name) TestEntities.
This is my web.config file :
 

<?xml version="1.0" encoding="utf-8"?>

<configuration>

<configSections>

<section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core" />

</configSections>

<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.

-->

</ideablade.configuration>

<system.serviceModel>

<!-- Set this to true to allow use of ASP.NET security features. -->

<serviceHostingEnvironment aspNetCompatibilityEnabled="false" />

<!-- You can add Service definitions to override the default configuration.

See the sample config files in the Learning Resources for more information.

-->

<services>

<!-- Note: the service name must match the configuration name for the service implementation. -->

<service name="EntityService" behaviorConfiguration="EntityServiceBehaviors" >

<!-- Add the following endpoint. -->

<!-- Note: your service must have an http base address to add this endpoint. -->

<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />

</service>

</services>

<behaviors>

<serviceBehaviors>

<behavior name="EntityServiceBehaviors" >

<!-- Add the following element to your service behavior configuration. -->

<serviceMetadata httpGetEnabled="true" />

</behavior>

</serviceBehaviors>

</behaviors>

</system.serviceModel>

<system.web>

<compilation debug="true" targetFramework="4.0">

<assemblies>

<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

</assemblies>

</compilation>

</system.web>

<connectionStrings>

<add name="TestEntities" connectionString="metadata=res://*/TestTableModel.csdl|res://*/TestTableModel.ssdl|res://*/TestTableModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=EHSAN\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

</connectionStrings>

</configuration>

 
& this is my App.config file (there was no app.config file in silverlight application by default & I added it manually)
 

<?xml version="1.0"?>

<ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">

<logging logFile="DebugLog.xml"/>

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

<clientSettings isDistributed="true" />

</objectServer>

<!-- Additional configuration can be added to override defaults. See the sample config files in the Learning Resources for more information. -->

</ideablade.configuration>

 

then I tried to create new entitymanager object in my silverlight application & query it using linq to devforce :
 

TestEntities mgr = new TestEntities();

var q = from r in mgr.testTables select r;
...

 
but when i execute my project, it just runs sccessfully but returns not result (my databse table is not empty), it seems there is no communication between client & server, because when i see IsConnected property of entitymanager object in debug mode, its always false (even then i pass should connect parameter to entitymanager constructor).
but i really dont know where is the problem, program is running without any error or warning . I've just this warning :
Warning 1 A custom tool '<RemoveToRestore>EntityModelCodeGenerator' is associated with file 'TreeTableModel.edmx', but the output of the custom tool was not found in the project.  You may try re-running the custom tool by right-clicking on the file in the Solution Explorer and choosing Run Custom Tool. 
but dont think it was the reason of my pronblem.
anybody can help me ?



Replies:
Posted By: smi-mark
Date Posted: 02-Jun-2010 at 9:00am
Hi,

You should check out the Silverlight examples in the DevForce2010 folder under My Documents. You cannot do a standard synchronous query with Silverlight.

You have to do something such as:

var query = mgr.TestTables;
query.ExecuteAsync(op => op.Results.ForEach(YourEntityList.Add));

where YourEntityList is some sort of collection of "TestTables"


Posted By: ehsan
Date Posted: 02-Jun-2010 at 12:21pm

I know that all server calls in silverlight are async, but devforce developer documents for silverlight are not sufficient at all :(

can u tell me where is the best place to begin with devforce for silverlight 4 ? (which forum, document or sample)


Posted By: smi-mark
Date Posted: 02-Jun-2010 at 12:31pm
If you are using DevForce 2010 you should see the 'DevForce2010' folder under My Documents.

C:\Users\Public\Documents\DevForce 2010\Learning Resources\030_BaseApps\SilverlightApps
C:\Users\Public\Documents\DevForce 2010\Learning Resources\080_UserInterfaces\SilverlightApps\Samples\200SLV_PagedCollections




Posted By: ting
Date Posted: 02-Jun-2010 at 7:05pm
Sorry to hear about your trouble.  We did fix a deployment problem and issued a patch which you can get from this thread:
http://www.ideablade.com/forum/forum_posts.asp?TID=1840 - http://www.ideablade.com/forum/forum_posts.asp?TID=1840
 
We are actively working on getting the documentation updated for DevForce 2010 and increasing the number of samples.  If everything goes as planned, we should have the DevForce 2010 RTM release next week.



Print Page | Close Window