New Posts New Posts RSS Feed: Question about Silverlight application debug
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Question about Silverlight application debug

 Post Reply Post Reply
Author
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Topic: Question about Silverlight application debug
    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:
 
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.


Edited by ting - 02-Jun-2010 at 7:08pm
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
ehsan View Drop Down
Newbie
Newbie
Avatar

Joined: 02-Jun-2010
Posts: 15
Post Options Post Options   Quote ehsan Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post 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"


Edited by smi-mark - 02-Jun-2010 at 9:01am
Back to Top
ehsan View Drop Down
Newbie
Newbie
Avatar

Joined: 02-Jun-2010
Posts: 15
Post Options Post Options   Quote ehsan Quote  Post ReplyReply Direct Link To This Post 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 ?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down