CSLA 4 RC1 available

CSLA 4 RC1 available

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


RockfordLhotka posted on Monday, July 19, 2010

I had hoped to release CSLA 4 this evening, but I had to fix an oversight around EditableRootListBase, and for people using ERLB this is a breaking change, so I want to give it a couple days to collect feedback.

When we updated the list types to be ObservableCollection instead of BindingList, ERLB was overlooked (sort of on purpose). But really it should get fixed now, so I decided to take the plunge. And while I was at it, I renamed the type to something (hopefully) less confusing.

So on .NET:

  1. EditableRootListBase is now DynamicBindingListBase (for Windows Forms)
  2. There's now DynamicListBase that might work with WPF (if the WPF datagrid wasn't so crappy)

And on SL:

  1. EditableRootListBase is now DynamicListBase
  2. There's also a DynamicBindingListBase for serialization compatibility with WinForms-oriented business libraries, but I recommend avoiding its use if possible

There's one other big change from RC0 to RC1 - and that's the non-generic LoadProperty() implementation.

Many people (including me as it turned out) disliked how LoadProperty() changed in RC0, and so RC1 has what I hope is a much better overall solution.

There are a couple other bug fixes - see the change log for details.

But if you use ERLB - please, please, please try RC1 ASAP (using DynamicBindingListBase) and let me know if you encounter issues.

alancjohnson replied on Tuesday, July 20, 2010

Hi,

 

I am trying to start a project from scratch and I have downloaded RC1 and the samples. I am using VS 2010 and .net 4.0.

It seems that in the samples downloaded next to the rc1 link are still on .net 3.5

Is there a sample project tracker or another similar app which uses csla 4.0 .net 4.0 VS2010 and hopefully silverlight so I can see how all this fits together.

Regards

Alan

RockfordLhotka replied on Tuesday, July 20, 2010

I just confirmed that the Samples-4.0.0-100719.zip file does contain the RC1 samples.

I removed all the samples that didn't build - we're out of time now, so I wanted to make sure that only CSLA 4 samples were in the download.

There are several Silverlight C# samples that are fairly comprehensive (InventoryDemo, SimpleApp, etc).

The C# ProjectTracker has Windows Forms, Web Forms and ASP.NET MVC interfaces. I'll be doing major rework on ProjectTracker as I write the upcoming ebook series, but it is workable now.

There aren't as many VB samples, if that's what you are looking for. But there are a few working samples, and hopefully there'll be more over time.

alancjohnson replied on Tuesday, July 20, 2010

Hi Rocky,

Thanks, I must have had the samples from RC0 because my folder had a lot more solutions than the one I just downloaded.

I tried the simple app and the inventory application. Both complied fine but I got the following error when running each sample and clicking on a button in the UI.

---------------------------
Error
---------------------------
System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.  Check InnerException for exception details. ---> System.ServiceModel.CommunicationException: An error occurred while trying to make a request to URI 'http://localhost:2835/WcfPortal.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. ---> System.Security.SecurityException ---> System.Security.SecurityException: Security error.

   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)

   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)

   at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)

   --- End of inner exception stack trace ---

   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)

   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)

   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)

   --- End of inner exception stack trace ---

   at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)

   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)

   at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)

   at Csla.WcfPortal.WcfPortalClient.WcfPortalClientChannel.EndFetch(IAsyncResult result)

   at Csla.WcfPortal.WcfPortalClient.Csla.WcfPortal.IWcfPortal.EndFetch(IAsyncResult result)

   at Csla.WcfPortal.WcfPortalClient.OnEndFetch(IAsyncResult result)

   at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)

   --- End of inner exception stack trace ---

   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()

   at Csla.WcfPortal.FetchCompletedEventArgs.get_Result()

   at Csla.DataPortalClient.WcfProxy`1.proxy_FetchCompleted(Object sender, FetchCompletedEventArgs e)

 

Jav replied on Tuesday, July 20, 2010

In C# with RC 1

1. SimpleApp compiles and works just fine.
2. InventoryDemo compiles and works just fine.
3. PagedList compiles and works fine.
4. SilverlightSOA compiles and works just fine.
5. CslaMvvmSL compiles and works. (StartUpPage is .html).  I tried adding a new person twice but did not see it in the list but that is not a criterion to judge the functionality of the demo anyway.

MVVMExperimentSL had some compile errors.  I have not looked into them.  I had to remove a couple of references from the SL project (System......Interactivity and something to to with Expression.Interactivity)  I didn't find either of those in my System.

Jav

RockfordLhotka replied on Tuesday, July 20, 2010

The MVVMExperimentSL (and probably the WPF version too) project demonstrates how to use the trigger action behaviors from Blend to route UI events to viewmodel methods. These samples require that you install Expression Blend 4 or at least the Blend 4 SDK.

alancjohnson replied on Wednesday, July 21, 2010

I agree everything compiles fine and you can run them up, but I perform any action I get the above error.

If this is just a problem with my setup and I am running it out of the box so to speak, any ideas what it might be?

 

 

RockfordLhotka replied on Wednesday, July 21, 2010

The cross-domain problem is probably the most common issue people hit when first getting started with Silverlight.

What's happening is that you are launching the SL project directly, rather than launching the web app. So Visual Studio actually ends up opening two instances of the web server - one for the SL app, one for the web app. The SL app then tries to talk to the web app, but it is found at a different URL (different web address) from the SL app itself - and therefore is a cross-domain call.

There are two solutions.

First (and simplest) is to switch the VS startup project to be the web app - that's how I build all these projects, but VS doesn't include the startup project in the sln file, so that gets lost when you open the solution.

Second is to add a cross-domain policy file to the web app, giving permission for SL to make the cross-domain call. That's something you might do in a real deployment.

Copyright (c) Marimer LLC