Quantcast
Channel: CSLA .NET
Viewing all 764 articles
Browse latest View live

Problem with CslaActionExtender when first saving doesn't succeed.

$
0
0

When using the CslaActionExtender  there exists the following problem.

Take the following actions:

Show a form to edit for example a customer object.

Stop SQL Server to simulate an error.

Click on the OK button of the Customer form.

An error will be raised to say that no connection to SQL Server can be done.

Until now the behavior is as expected.

Start SQL Server again.

Try again to click on the OK button.

We get the following error:

System.InvalidCastException: The underlying data source does not cast to a CSLA BusinessBase object

This behavior is not as expected because the save should work now.

 

The problem is that the data source is empty. In case of an error you should call _bindingSourceTree.Bind(savableObject) no matter what PostSaveAction you have. Even in the case AndClose you should rebind the datasource so the user can try again to save the object.

Below follows the code of CslaActionExtender  with an added line of code which solves the problem in my opinion.

Lhotka : can you have a look at this suggestion?

protectedvoid OnClick(object sender, System.EventArgs e)

.....

try

{

savableObject = savableObject.Save()

as Csla.Core.ISavable;

...

}

catch (Exception ex)

{

_bindingSourceTree.Bind(savableObject);

//by adding this line of code it solves the problem

OnErrorEncountered(newErrorEncounteredEventArgs(props.CommandName, newObjectSaveException(ex)));

raiseClicked = false;

}

 


CSLA 4 for iOS (Xamarin) coming soon

$
0
0

We're closing in on a version of CSLA .NET that works on iOS using the Xamarin tools.

This is the result of a lot of work by Stuart Bale, Kevin Ford, and myself, and Kevin is getting very close to where we can release a beta version - hopefully yet this week.

If you have Xamarin for iOS I hope you'll help us test this out, but we're very excited!!

Version 4.5.580-Beta (with iOS support) now online

Property Authorization based on value doesn't appear to be working correctly

$
0
0

Hi,

Hopefully this question will have better success than the last....

I have table called GP.  Two of the fields are called IsCurrentOption and GPPracticeId .

The GPPracticeId is a foreign key to the GPPractice table.  A GPPractice also has an IsCurrentOption field.

I have a rule that if the GP record is related to a GPPractice with the IsCurrentOption  = false then the GP must have IsCurrentOption = false.

I’ve created a Dynamic Root List based on the GP table.  This has rules in places to deal with the scenario above and that all works well.

In my list I want to stop the user from being able to edit the IsCurrentOption field if the associated GPPractice is IsCurrentOption  = false.

I created a custom Authorization rule to deal with that scenario. 

When the list is loaded the rule is evaluated and the IsCurrentOption property is readonly where appropriate.

If the GPPractice is changed to a GPPractice that has IsCurrentOption = true my Authorization rule is not checked.  Instead the BusinessBase will consult its cache and get the value from the last time the rule was checked.  It’s not until the BusinessBase is saved (I’m assuming  putting the BusinessBase  through the data portal loses its cache as the caches are not serialised), will the rule be checked and return the correct result.

I couldn’t see any way of forcing my rule to be checked when the properties are changed.

 

Any idea’s how I can resolve this issue? 

Many thanks,

Nathan

Windows Authentification (PopulateWindowsIdentity issue )

$
0
0

Context : NET 4.5 / SL 5 / Csla: 4.5.30.0 / IIS: 7.5 / OS: Win7

Hi everyone,

I am currently experiencing a problem getting windows authentication working with my CSLA 4.5 SL application.  I have setup windows authentication the same way as the samples from the ebook (04-Dataportal).

When I run the application from my development workstation with IISExpress, everything works fine.  So I have next setup my development and test web servers using IIS 7.5.  I have worked through many issues getting impersonation to work (starting with just enable Windows Authentification and ASP.NET Identity, using Asp.net v4.0 Classic application pool ...).  Now, I think the IIS configuration and web.config are fine (Just in case, I have included them at the end of the post).  

Now, when I call the application (hosted into iis) from the browser on my development machine, the browser authentication prompt is displayed but if I log-in I get the following exception : "Some or all identity references could not be translated":

So, I ended up setting up remote debugging on my development web server to see what was going on.I have found that the exception came up on the PopulateWindowsIdentity method (Csla.Silverlight.Security)

 
Below, the stack trace:

    à System.Security.Principal.SecurityIdentifier.Translate(IdentityReferenceCollection sourceSids, Type targetType, Boolean forceSuccess)

   à System.Security.Principal.SecurityIdentifier.Translate(Type targetType)

   à Csla.Silverlight.Security.WindowsIdentity.PopulateWindowsIdentity()

   à Library.CustomIdentity.DataPortal_Fetch() dans c:\Users\CONTE\Documents\Visual Studio 2012\Projects\Samples\CSLA V4.5.30-23\04-DataPortal-110504\Authentication\Windows 4.5\Library.Net\CustomIdentity.cs:ligne 27

   à lambda_method(Closure , Object , Object[] )

   à Csla.Reflection.MethodCaller.CallMethod(Object obj, DynamicMethodHandle methodHandle, Boolean hasParameters, Object[] parameters)

 

Does anybody know what the issue here might be?  

 

Here some posts with interesting advices:

http://forums.lhotka.net/forums/p/8931/42494.aspx

http://forums.lhotka.net/forums/p/9453/44801.aspx

 

IIS Configuration used :
·         IIS Authentication settings: ASP.NET Impersonation and Windows Authentication are enabling.
·         ASP.NET v4.0 Classic is used for the application pool

web.config used:
 
<configuration>
  <appSettings>
    <add key="CslaAuthentication" value="Windows"/>
    <add key="CslaWriter" value="Csla.Serialization.Mobile.CslaBinaryWriter, Csla" />
    <add key="CslaReader" value="Csla.Serialization.Mobile.CslaBinaryReader, Csla" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5"/>
    <authentication mode="Windows"/>
    <identity impersonate="true" /> <!-- comment it to run with iis express -->
    <pages controlRenderingCompatibilityVersion="4.0"/>
  </system.web>
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
        <listeners>
          <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:\temp\WinAuthTrace.xml"/>
        </listeners>
      </source>
    </sources>
    <trace autoflush="true"/>
  </system.diagnostics>
  
  <system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
    <services>
      <service name="Csla.Server.Hosts.WcfPortal" behaviorConfiguration="windowsAuthReturnFaults">
        <endpoint binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IWcfPortal" contract="Csla.Server.Hosts.IWcfPortal"/>
      </service>
      <service name="Csla.Server.Hosts.Mobile.WcfPortal" behaviorConfiguration="returnFaults">
        <endpoint binding="basicHttpBinding" bindingConfiguration="basicHttpBinding_IWcfPortal"
                  contract="Csla.Server.Hosts.Mobile.IWcfPortal" />
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
          <binding name="basicHttpBinding_IWcfPortal"
                   maxReceivedMessageSize="2147483647"
                   maxBufferPoolSize="2147483647"
                   maxBufferSize="2147483647">
            <readerQuotas maxBytesPerRead="2147483647"
                          maxArrayLength="2147483647"
                          maxStringContentLength="2147483647"
                          maxNameTableCharCount="2147483647"
                          maxDepth="2147483647"/>
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows"/>
          </security>
        </binding>
      </basicHttpBinding>
      <wsHttpBinding>
        <binding name="wsHttpBinding_IWcfPortal" 
                 maxReceivedMessageSize="2147483647">
          <readerQuotas maxBytesPerRead="2147483647" 
                        maxArrayLength="2147483647" 
                        maxStringContentLength="2147483647" 
                        maxNameTableCharCount="2147483647" 
                        maxDepth="2147483647"/>
        </binding>
      </wsHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="returnFaults">
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <serviceAuthorization impersonateCallerForAllOperations="true" /> <!-- comment it to run with iis express -->
        </behavior>
        <behavior name="windowsAuthReturnFaults">
          <serviceDebug includeExceptionDetailInFaults="true"/>
           <serviceAuthorization impersonateCallerForAllOperations="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

 

Best regards,

 

Cedric

 

Clarify - Private backing fields, LoadProperty, and Common rules

$
0
0

Hi there,

Need some clarification on this statement from previous post:

My key issue is that there is a LOT you must make sure to NOT use, such as the standard rules, the CslaContrib rules 
or the CslaGenFork rules.

    Refresh of my situation:

    • I am using DTO from my DAL as a private field in BusinessBase object.  The individual PropertyInfo objects are marked with PrivateField and the Getters/Setters use the GetProperty and SetProperty.
    • I cannot bring myself to write a LoadProperty/ReadProperty overload for every property!  It is too unmaintainable unless I only had a couple properties.

    Currently I am using the CommonRules and they work great!!  Only the DataAnnotation rules do not work.  I debugged the CommonRule, the execution does a Using ByPassPropertyChecks and then calls my getter on the primary property using the DynamicMethodGetter.

    Given the following parameters (question below)

    • I do not use Async rules
    • I do not use the CSLAContrib or CSLAGenFork rules
    • I do not use Input or OutputProperties
    • I do not target async clients (WinRt, WPhone, Silverlight)
    • If I DO ever write an async rule with no Target access OR if I use input/output properties I will do Load/ReadProperty overload for the few relevant properties

    Am I missing something?  Thanks for patience as I understand the guts of what is going on. 

    This code is screaming fast and I like not having to load my business object properties one by one from the DAL layer at fetch and update!  Yes my DTO is tied into my BusinessLayer, but I am willing to live with that for the benefit.

    Extra benefit is I want to spin up a ReadOnly version I can transfer the DTO to a ReadOnly Friend factory method and viola!

    SafeDataReader returning null values?

    $
    0
    0

    I had assumed that SafeDataReader would convert any null strings coming from SQL Server into String.Empty.

    But after finding some app exceptions logged, I have confirmed that null values from the database are being set to Nothing (vb.net) in their properties. I don't want to have to deal with null/Nothing in string properties.

    Am I doing something wrong?

    The code I am using was generated by CodeSmith, using encapsulated implementation. It uses a SafeDataReader, and in this case it passes it to a Map routine.

    Something like this:

    LoadProperty(_LongDescriptionProperty, reader.Item("LongDescription"))

    Will break my app if I try something like:

    Foo.LongDescription.Trim, because it will throw an exception.

    Am I doing something wrong? I'd hate to have to write a bunch of code to check for null values, and convert them to empty strings.

    Thanks.

    FWIW, I'm a longtime user of CSLA (since VB6 days). Not on every project, but on quite a few, in different industries. It's a great tool.

     

     

    Impersonation not working in PopulateWindowsIdentity()

    $
    0
    0

    Hi guys,

    I think I have an interesting one.  I have been reading many, many discussions on this topic and altering my code and have found an interesting quirk.  Below are the most useful discussions I've read and taken ideas from.

    http://forums.lhotka.net/forums/p/12036/56156.aspx

    http://forums.lhotka.net/forums/p/8931/42494.aspx

    I have a .NET 4.5, CSLA 4.5.40, Silverlight 5, IIS 7.5 application that has been working terrifically locally but I've been trying to deploy to a webserver.  My AppPool settings have gone through every possible permutation but I have settled with Integrated and Identity: LocalSystem.  If I change the identity it gives similar results as mentioned below but with a different system account.  IIS site authentication only has ASP .NET Impersonation and Windows Authentication Enabled.

    Here is the web.config with all the tags that have been identified as required:

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

    <configuration>

      <appSettings>

        <add key="EventLogName" value="GreyDev" />

        <add key="CslaAuthentication" value="Windows"/>

        <add key="CslaWriter" value="Csla.Serialization.Mobile.CslaBinaryWriter, Csla" />

        <add key="CslaReader" value="Csla.Serialization.Mobile.CslaBinaryReader, Csla" />

      </appSettings>

      <connectionStrings>

    PRIVATE :)

      </connectionStrings>

      <system.web>

        <compilation debug="true" targetFramework="4.5" />

        <authentication mode="Windows" />

        <identity impersonate="true" />

        <pages controlRenderingCompatibilityVersion="4.0"/>

      </system.web>

      <system.webServer>

        <validation validateIntegratedModeConfiguration="false" />

      </system.webServer>

      <system.serviceModel>

        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />

        <services>

          <service behaviorConfiguration="WcfPortalBehavior" name="Business.Compression.CompressedHost">

            <endpoint binding="basicHttpBinding" contract="Csla.Server.Hosts.Mobile.IWcfPortal" bindingConfiguration="BasicHttpBinding_IWcfPortal" />

          </service>

        </services>

        <behaviors>

          <serviceBehaviors>

            <behavior name="WcfPortalBehavior">

              <serviceDebug includeExceptionDetailInFaults="true" />

     <serviceAuthorization impersonateCallerForAllOperations="true" />

            </behavior>

          </serviceBehaviors>

        </behaviors>

        <bindings>

          <basicHttpBinding>

            <binding name="BasicHttpBinding_IWcfPortal" 

    maxReceivedMessageSize="2147483647"

                       maxBufferPoolSize="2147483647"

                       maxBufferSize="2147483647" >

              <readerQuotas maxBytesPerRead="2147483647"

                              maxArrayLength="2147483647"

                              maxStringContentLength="2147483647"

                              maxNameTableCharCount="2147483647"

                              maxDepth="2147483647" />

              <security mode="TransportCredentialOnly">

                <transport clientCredentialType="Windows" />

              </security>

            </binding>

          </basicHttpBinding>

        </bindings>

      </system.serviceModel>

    </configuration>

    On to my results.  In my AppIdentity class I call the CSLA method PopulateWindowsIdentity().  Digging into this method I found that the main call to retrieve the impersonated windows user is:  var currentUser = System.Security.Principal.WindowsIdentity.GetCurrent();
    No matter what config, IIS or AppPool settings I have changed, the returned WindowsIdentity.Name is always "NT AUTHORITY\SYSTEM" (this varies when changing the AppPool Identity as mentioned before).  It never impersonated the user, in my case 'speters' (my AD name).  I have made a small ASP web app with the same config and IIS settings and in that app, Impersonation works!  In that application, I have found that the web.config setting <identity impersonate="true" /> directly turns off or on the Impersonation with the true/false setting.
    After 3 days of trying every setting I could find, reading every article I could find, I decided to call another method in my AppIdentity class, var cslaname = Csla.ApplicationContext.User.Identity.Name.
    This Csla.ApplicationContext call successfully retreives my Impersonated AD credentials.  With this information I have managed to check the result of both Identity calls and choose the one that is needed, so technically my applicaton is working.  However, I still would love to know what it takes to get the WindowsIdentity to properly Impersonate.
    In Summary, with all the above settings:
    System.Security.Principal.WindowsIdentity.GetCurrent().Name; Does NOT Impersonate Client User AD
    Csla.ApplicationContext.User.Identity.Name;  Does Impersonate/Fetch Client User AD
    Any thoughts on whats happening here?

     


    CSLA Short Circuiting Rules

    $
    0
    0

    I've noticed that short-circuiting rules in CSLA 4.5.501.0 is not working. That is when I set prioritization to my business rules then set the ProcessThroughPriority. When I query the Broken Rules I get all invalid rules even those that has higher priority than ProcessThroughPriority value. Is there a newer way of doing it?

    Errors From Data Portal are all generic Async Error

    $
    0
    0

    Hi,

    Before upgrading from 4 to 4.5, exceptions coming back from the data portal would have the message of the original exception such as "Another user has modified the row in Table1, update failed".  Now all that comes back as the message is than an Async Error occurred.  There is no detail as to the problem.  What is the method that people are using to return the original message such as a table update failed back to the client?

    Todd Haehn

    Silverlight Video Demo0002 - Blank page comes up when run

    $
    0
    0

    I downloaded the codes for the Silverlight video Demo0002.  If I set the Demo project as the default project the page loads and I get the cross domain error as expected.  I then set the Demo.Web project as the default.  When I run the program a blank web page comes up.  I have done extensive searches for this issue but have not found any references to it.

    Silverlight Random Fetch Error

    $
    0
    0

    I have a created a Read Only Lists that inherits from CSLA ReadOnlyListBase. I am calling a BeginGet method passing in a criteria class (both classes have been marked as serializable).

    This fetch does work on the first call, however any subsequent calls of the same method are causing the error below:


    ERROR MESSAGE:


    {: at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.ClientBase1.ChannelBase1.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) : Error HRESULT E_FAIL has been returned from a call to a COM component. at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) at System.Net.Browser.BrowserHttpWebRequest.<>c_DisplayClassa.b_9(Object sendState) at System.Net.Browser.AsyncHelper.<>c_DisplayClass4.b_0(Object sendState) }

    My breakpoint on the DataPortal_Fetch method is not being hit (after the first fetch) on the server side, as the error indicates. 

    Any advice to help me solve this would be appreciated.

    PCL Portable Class Libraries and multi platform support

    $
    0
    0

    Microsoft is interested in buying Xamarian.  More MVVM frameworks are now working better with PCL and multi platform solutions such as MVVMCROSS.  With these changes in the multi platform arena, has there been any readdressing of the issue of building a CSLA Core module compatible with Portable Class Libraries?  I am now having to face the decision of leaving behind my beloved CSLA.

    Changing "AuthorizationRuleManager" behaviour.

    $
    0
    0

    Base class:

    public class MyBusinessBase<T> : BusinessBase<T> where T:  MyBusinessBase<T>

    {

        protected static void AddObjectAuthorizationRules()
        {
            var tp = typeof(T);
            var roleName = "role_" + tp;
            BusinessRules.AddRule(tp, new IsInRole(AuthorizationActions.CreateObject, roleName));
            BusinessRules.AddRule(tp, new IsInRole(AuthorizationActions.GetObject, roleName));
        }

    }

     

    If we will change "AuthorizationRuleManager" behaviour like this:

        private static void InitializePerTypeRules(AuthorizationRuleManager mgr, Type type)
        {

            ...

            var type2 = type;
            var flags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic |  BindingFlags.DeclaredOnly;
            while (type2 != typeof(object))
            {
                // invoke method to add auth roles
                var method = type2.GetMethod("AddObjectAuthorizationRules", flags);
                if (method != null)
                {
                    method.Invoke(null, null);
                    break;
                }
                type2 = type2.BaseType;
            }

            ...

        }

     

    We will achive next:

    - all inherited objects will inherit  "AddObjectAuthorizationRules" method. And I can even override this method.

     

    So, is this good or bad idea?

    Simple ObjectContextManager Question

    $
    0
    0

    Hi,

     

    I am new to CSLA. And got stuck up.

     

    i am getting the following error when using the Entity frameework.

     

    Error1The type 'ShasPatho.DalEf.ShasPathoEntities' cannot be used as type parameter 'C' in the generic type or method 'Csla.Data.ObjectContextManager<C>'. There is no implicit reference conversion from 'ShasPatho.DalEf.ShasPathoEntities' to 'System.Data.Objects.ObjectContext'.

     

    any help would be great.

     

    regards

     

    ashish


    IIS 7 and WCF 4 REST Service and dataportal configuration

    $
    0
    0

    Hello everyone,

    I have developed wcf .net 4 REST service that uses the wcf dataportal. Both services are hosted in IIS 7 in same web app.  Parts of the web.config are enclosed at the end of this message.  

    My wcf service runs successfully on ASP.NET developer server, but not in the IIS web server.  When accessing an API from web browser on port 80, I keep receiving this exception message:

    Exception has been thrown by the target of an invocation

    Would you have any ideas why could this be happening?  

     

    The web,config:

    <?xml version="1.0"?>

    <configuration>

      <appSettings>

        <add key="MyDbName" value="MY_DB" />

        <add key="CslaAuthentication" value="Csla"/>

      </appSettings>

      <connectionStrings/>

      <system.serviceModel>

        <protocolMapping>

          <add scheme="http" binding="webHttpBinding" />

        </protocolMapping>

        <behaviors>

          <serviceBehaviors>

            <behavior name="WebServiceBehavior">

              <serviceMetadata httpGetEnabled="true"/>

              <serviceDebug includeExceptionDetailInFaults="true"/>

            </behavior>

            <behavior name="returnFaults">

              <serviceDebug includeExceptionDetailInFaults="true" />

            </behavior>

          </serviceBehaviors>

          <endpointBehaviors>

            <behavior name="RESTEndpointBehavior">

              <webHttp />

            </behavior>

          </endpointBehaviors>

        </behaviors>

        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="1" />

        <services>

          <service behaviorConfiguration="WebServiceBehavior" name="Something">

            <endpoint address="" binding="webHttpBinding" contract="ISomethingContract" behaviorConfiguration="RESTEndpointBehavior" />

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

            <host>

              <baseAddresses>

                <add baseAddress="http://localhost:8000" />

              </baseAddresses>

            </host>

          </service>

          <service name="Csla.Server.Hosts.WcfPortal" behaviorConfiguration="returnFaults">

            <endpoint binding="wsHttpBinding" contract="Csla.Server.Hosts.IWcfPortal" bindingConfiguration="WSHttpBinding_IWebService"/>

          </service>

        </services>

        <bindings>

          <wsHttpBinding>

            <binding name="WSHttpBinding_IWebService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">

              <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>

              <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>

              <security mode="None">

                <transport clientCredentialType="None"/>

              </security>

            </binding>

          </wsHttpBinding>

        </bindings>    

      </system.serviceModel>

      <system.web>

        <sessionState mode="InProc" cookieless="true" regenerateExpiredSessionId="false" timeout="20"/>

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

        </compilation>

        <authentication mode="Windows"/>

           <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>

      </system.web> 

    </configuration>

     

    Thank you in advance,
    Tanja

    PS. The web site is setup in the ASP.NET v4.0 Application pool  (Integrated managed pipeline mode and ApplicationPoolIdentity for indenty) and the WcfPortal.svc is located in the same location where my svc file is.

    Xamarin, CSLA, and Mac OS

    $
    0
    0

    So CSLA with iOS is in "beta" or in the initial stages of becoming possible - I do believe by looking at a pamphlet from Xamarin that they also drive Mac OS native applications.  I have a question out to someone at Xamarin as to whether these would be two different projects and native app buildouts in the solution (I'm guessing they would be).

    In thinking about advocating for the Xamarin approach here, I wanted to see what the envisioned CSLA support for Mac OS would be.  Is that basically done when iOS became potentially supported or is this another ball of wax?

    CSLA 3.0.6 to latest version 4.5.501

    $
    0
    0

    I am not sure if I posted this question before or somebody posted it, but somehow I cannot find the discussion.

    We had lots of in-house applications that uses CSLA 3.0.6, .NET Framework 3.5/4, VS2010.  Would it possible to upgrade all of those to the latest CSLA version (4.5.501), .NET Framework 4.5 and VS 2012?

    One our concern are there lots of validation and business rules in any of the project.

    Thanks.

    Property Setter running AFTER PropertyHasChanged

    $
    0
    0

    When my private backing field SetProperty is called...even though it is ByRef, the value in mDTO.EvidNum does not change until AFTER the PropertyHasChanged runs.

    This means that a simple rule like StringRequired runs and sees an empty string and the rule stays broken.  But the next step after rules running is that the mDTO.EvidNum property setter is called.  So you look at the business object and the rule is broken but there is a value there.

    Any ideas?  I assume the CSLA code assumes a private backing field is just a string not a Class.StringProperty.

     

    I have the following code:

        PrivateShared EvidNumPropertyInfo AsPropertyInfo(OfString) = RegisterProperty(OfString)(Function(c) c.EvidNum, RelationshipTypes.PrivateField)

        PublicProperty EvidNum() AsString

            Get

                Return GetProperty(EvidNumPropertyInfo, mDTO.EvidNum)

            EndGet

            Set(ByVal value As String)

                SetProperty(EvidNumPropertyInfo, mDTO.EvidNum, value)

            EndSet

    Normal 0 false false false EN-US JA X-NONE

        EndProperty

     

    Possible new forum software

    $
    0
    0

    Hello everyone,

    I am giving serious thought to replacing this current forum with a new and more modern set of software.

    This forum runs on something called Community Server, and has gotten quite "long in the tooth". You might notice that it looks somewhat old, doesn't work well on phones, and spam is an increasing problem. What you _can't_ see is that behind the scenes fewer and fewer features are actually working at an admin level.

    In other words, the current software is approaching any reasonable end of its life.

    I don't yet know what I'll use to replace it, and if you have any suggestions of great/inexpensive forum hosting please let me know.

    I _am_ considering using something called Discourse, which is a new open source forum project on GitHub. It looks like I can host it in Azure for a relatively small cost - hopefully low enough that the ads on the site will pay for the hosting.

    I'm open to comments/thoughts/suggestions - this is your community as much as mine, and I value your input.

    Viewing all 764 articles
    Browse latest View live