Frequently Asked Questions (FAQ)

Frequently Asked Questions (FAQ)

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


RockfordLhotka posted on Monday, December 11, 2006

There are numerous CSLA .NET resources available where you can often find answers to frequently asked questions.

The primary home page for CSLA .NET is www.lhotka.net/cslanet. At this location you can find answers to many frequently asked questions, along with a comprehensive set of links to official and community locations with other information and resources.

Some common links include:

  • What is CSLA .NET?
  • Download CSLA .NET
  • CSLAcontrib project (community contributed projects like code-gen templates)
  • One Little Victory tutorial site
  • Introductory article
  • Old CSLA .NET forum

    There is also a wiki, where you can find and contribute information about CSLA .NET version 1 or 2.

    General Csla FAQs

    1. I'm trying to run my Csla web application on a hosted web server, but I'm getting SecurityExceptions stating that the assembly does not allow partially trusted callers.

      Answer:  Csla requires full trust to run because of its extensive use of reflection.  You'll need to grant Csla full trust to run.  Please see this thread for more details.

    2. How do I load children / grandchildren objects?

      Answer:  See the following threads:
      Can I load children and grandchildren with one datareader?
      What is the best way to load grandchildren?

    Csla 2 FAQs

    1. I'm getting a System.Runtime.Serialization.SerializationException: Type is not resolved for member 'MyProject.MyLibrary.MyCustomPrincipal, MyProject.MyLibrary' in my Asp.Net application.

      Answer:  You are likely running the application through Cassini and not IIS.  Due to limitations in Cassini, you cannot run Csla applications through it unless you install your assembly into the GAC.  For more information please see the Install document and Rocky's explaination.
    2. My DataGridView is removing the wrong item from my BusinessListBase subclass, but it only seems to do so if the item removed IsNew.

      This is because the grid uses Equals, which is overriden by BusinessBase. Equals in turn uses the value returned from GetIdValue to deterimine if one instance is 'equal' to another. Your object is likely always using an integer to identify the object, and new objects always get 0 for their id. You'll need to assign a unique temporary id to new objects. This can be done by creating a static field in your class and setting it zero. Each new instance which is created should decrement the value and assign it to the id property.  See this article for more information.
  • Copyright (c) Marimer LLC