CSLA SilverLight Errors

CSLA SilverLight Errors

Old forum URL: forums.lhotka.net/forums/t/7299.aspx


SouthSpawn posted on Saturday, July 18, 2009

I am getting two new errors dealing with CSLA SilverLight.
 
1. http://img238.imageshack.us/img238/7329/errormessage2.jpg

This one is with the project I created.
 
2. http://img268.imageshack.us/img268/4285/errormessagej.jpg

This one I get with the demo project Demo004 from the SilverLight Training Videos.

I have been working on this for 6 hours, any help would be create.

Is there something special with IIS on my local machine I have to do.

I am running this on IIS 5 on window XP.
 
Thanks

RockfordLhotka replied on Sunday, July 19, 2009

I don't see anything obvious from those stack traces. It isn't clear that the calls are getting off the client, so it could be a problem with the client configuration file maybe?

You can always put a breakpoint at the top of your data portal methods on the server to see if the call gets there - but it doesn't look to me like you are getting off the client.

SouthSpawn replied on Sunday, July 19, 2009

Rocky,

How does the BeginCreate method work.

My Client Object is excatly coded the same as the one in the training videos.
It seems as the stack trace is failing at the "BeginCreate" method.

When I mess around with the Visual Studio 2008 SilverLight Designer, that's when it is popping up that long stack trace method.

I notice that it says "Object not set to an instance of an object".

I wonder is the designer trying to fire off the server side code and is returning nothing?
Also, I am not getting how does the WcfSlProtal.svc know which server side class to call?

I am really confused here.

Thoughts?

RockfordLhotka replied on Sunday, July 19, 2009

Oh, that might explain it.

 

The data portal will detect that your code is running in design time and will route any create/fetch operations to a method named DesignTime_Create() in your root class – that’s the client-side class.

 

This is necessary because the config file for Visual Studio (or for Blend) won’t have the correct WCF configuration to talk to your app server, and your app server may well not be running either – so this bypasses all those concerns.

 

DesignTime_Create() should be implemented just like a DataPortal_Create() that takes no parameters – as an instance method that returns void. This is true in 3.6.3, but not in 3.6.0 – where the method was static and the implementation was kind of jumbled :(

 

Rocky

 

SouthSpawn replied on Sunday, July 19, 2009

Rocky,

Are you saying that I should do the following in my SilverLight "Class.Client"

public static void DesignTime_Create()
{

}
 
 

RockfordLhotka replied on Sunday, July 19, 2009

If you are using the old version yes.

 

If you are current you should do

 

public void DesignTime_Create()
{

}

 

Calling a static method was a bug in data portal that has been fixed in current code.

 

Rocky

SouthSpawn replied on Sunday, July 19, 2009

Thanks for all your help Rocky as I know you are a super busy person.
 
But, that didn't fix my issue.

I am still getting the "Object not set to an instance" error.

I still also get the error Cannot find 'ServiceReferences.ClientConfig' in the .xap application package.

I even tried the advice at http://www.dontcodetired.com/blog/post/Cannot-find-ServiceReferencesClientConfig-in-the-xap-application-package-when-running-Silverlight-unit-tests.aspx to fix the error and that didn't work.

It's just frustrating here.

I'll keep at it, but I am pretty stuck.
 
Thanks For your help anyways.

Mark

Copyright (c) Marimer LLC