LDSTechForumProjects

Stack Release Details

The .NET Stack 3.4 is now available on MSStack. This 3.4 release of .NET Stack is targeted to work with the TFS 2010, Visual Studio 2010, and .NET 4 products that Microsoft released in 2010.

What's New in .NET Stack 3.4?

This release covers:

  1. Canary Pages
  2. ClickOnce Deployment with the TFS Build Process.

For more detailed information, go to the Stack Release Notes.

What's New in .NET Stack 3.3?

Version 3.3 and up deals with:

  1. Digest Authentication with the LDS .NET Stack
  2. Integration of Microsoft Web Protection library
  3. Adding custom HTTP Headers through Digest Authentication.

For more detailed information, go to the Stack Release Notes.

What's New in .NET Stack Update 3.2.2?

  1. Ignore paths for static content: Create a list of folders in your web application project for stack authentication to ignore. This will save your project from performing needless authentication requests for simple file requests such as images and scripts.
  2. Moved the check for single sign-on (SSO) to earlier in the page life cycle.

What's New in .NET Stack 3.1?

Features

  1. New and improved install and uninstall process for the .NET Stack libraries.
  2. Changes to Registering Stack in Container.
  3. The Stack Security Framework has been redesigned and simplified to reduce the number of configuration issues and improve the usability of the APIs.
  4. New .NET Stack Security Authorization improvements and naming.
  5. LDS Account refactor - Enabled search of LDS Account by Membership Record Number.
  6. Simple participation in WAM SSO for web application through Web.config settings.

Bugs Fixed

  1. 25490: Serialization exception for LDSAccountUser for any non-workforce LDS account user.
  2. 25953: Stack Build Template selects wrong version number.

Detailed Descriptions

Feature 1: New and improved install and uninstall process for the .NET Stack libraries.

The new utility that has been chosen as the vehicle for installing and uninstalling the Stack is called NuGet (formerly known as NuPack). From now on, to install the .NET Stack, download the latest version of NuGet from codeplex (http://nuget.codeplex.com/) and then install the "LDS Stack" package, which will also install its dependency, the "Unit" package. If ever you need to uninstall .NET Stack 3.0, you would need to uninstall both packages (Lds Stack and Unity). The NuGet install will plug into Visual Studio 2010, so to install a new package follow these steps:

  1. Right-click on your project in Solution Explorer and choose "Add Library Package Reference..."
  2. In the "Add Library Package Reference" dialog, click on the "Online" tab in the left pane.
  3. Click on the "LDS Stack" package source in the left pane.
    a) If the "LDS Stack" package does not show in the list, click Settings in the lower left hand corner.
    b) In the Name field, type in "LDS Stack."
    c) In the Source field, type in the drop location of the .NET Stack 3.0 packages: \\10.97.149.29\drop\MSStack\Install.
    d) Click Add, and then click OK.
  4. Click the Install button for the "LDS Stack Library for Web Applications" packages.
  5. Since the LDS Stack package has a dependency on the Unit package it will automatically get installed at the same time.
  6. When the installation is complete, a green check-mark will be displayed.
  7. Click Close.
  8. Looking at the References section of your project and at the Web.Config file will show the changes that the LDS Stack package has made to your project.

If you have a previous version of the .NET Stack installed as part of your existing project, you will need to perform a simple upgrade process. First, remove the old references to any Lds.Stack library and any Microsoft.Practices library files in your References section of the Solution. Add the .NET Stack 3.0 library package reference using NuGet, as described above. This will automatically add the necessary LDS Stack and Unit references to your project. See the "Upgrade" section in Feature 2 details below for more information on upgrading .NET Stack version changes needed to your project.

If you love Powershell, then you can bring up the Package Manager Console. In the console, you can type Powershell commands, such as "Get-Package," "List-Package," "Install-Package," "Uninstall-Package," and "Update-Package." For more detailed information about the NuGet tool (current release is v2.0), go to http://nuget.codeplex.com/.

Feature 2: Changes to Registering Stack in Container. It is no longer necessary in a web application to register the Stack in the default container in your Global.asax file under the Application_Start method since this is now done for you by adding a Library Package Reference of the .NET Stack 3.0 into your project. So you can remove the following line from your code:

Container.RegisterStackInContainer(Container.Default);

Also, it is no longer necessary to call the EstablishPrincipalFromCookie method in the Application_PostAuthenticateRequest method in the Global.asax file. This is also done for you automatically when a Library Package Reference to the .NET Stack 3.0 is added into your project.

To add authentication to your .NET project most of it is done for you when the LDS Stack Package Library Reference is added to your project. The first thing to do is fill in the Application Account name and password that has rights to LDS Account to your Configuration file (either Web.Config or App.Config). If you do not have an Application Account then you need to contact your ASE. In your config file, edit the line that looks like this:

<ldsAccountConnection userName="{Your Application Account}" 
  password="{Your Application Password}" 
     server="{Directory Server}" />

Also, be sure to change the server to the LDS Account Production server before releasing your product. Once configuration is complete, you can add authentication to your web app by adding the following line:

FormsAuthentication.SetAuthCookie(userName, true);

This will take the username passed in and identify the corresponding LDS Account.

Feature 3: The Stack Security Framework has been redesigned and simplified to reduce the number of configuration issues and improve the usability of the APIs.

Feature 4: New .NET Stack Security Authorization improvements and naming.

The names of the Authorization methods that verify that a principal has or demands an application, privilege, role, position, or in a group have been changed. The new method names are:

IsInRole Determines whether the current principal belongs to the specified role
HasPrivilege Checks whether the user has the specified privilege
HasPosition Checks whether the user has the specified position
IsInUnit Checks to see whether the user is in the unit specified
HasApplication Checks to see whether the user has been granted access to the application in Lds Account

The following Lds Stack Authorization methods have been deprecated in .NET Stack 3.0:

HasGroupMembership HasRoleInApplication
HasPrivilegeAccessLevels HasRoleInGroup
HasPrivilegeInApplication HasRoleThroughPosition
HasPrivilegeInGroup HasRoleThroughUnit
HasPrivilegeThroughPosition HasRoleThroughUnitPosition
HasPrivilegeThroughUnit HasRoleThroughUser
HasPrivilegeThroughUnitPosition HasUnitMembership
HasPrivilegeThroughUser HasUnitPosition
HasRole

Some of these methods have been simplified and combined to make them obsolete. For example, the Role name now contains the Unit Id separated by the '|' character. Example: Member|999000.

Feature 5: LDS Account refactor - Enabled search of LDS Account by Membership Record Number.

There is a method called FindLdsAccountUsers in the LdsAccountProvider class. You can pass in as parameters the Lds User property values on which you want to search. For example, the following code will search for a user whose UserName is "johndoe:"

using (LdsAccountProvider provider = new LdsAccountProvider())
{
    LdsAccountSearchParameters parameters = new LdsAccountSearchParameters();
    parameters.UserName = new SearchString("johndoe", SearchType.Contains);
    IEnumerable<LdsAccountUser> user = provider.FindLdsAccountUsers(parameters);
}

Multiple search criteria can be added to the LdsAccountSearchParameters. The Lds Account User properties that you can search on include:

UserName
GivenName
PreferredName
Surname
AccountId
MembershipRecordNumber
EmployeeType
EmployeeStatus

You can also use wildcards in the following ways to perform Lds Account User searches:

Contains
EndsWith
StartsWith

You cannot search by insufficient criteria (such as by only EmployeeStatus) or by AccountId or MembershipRecordNumber using a wildcard.

Bug 25490: Serialization exception for LDSAccountUser for any non-workforce LDS account user.

There is no longer an exception thrown if the LDS Account User has a non-workforce account and does not have a specified manager. This has been fixed in .NET Stack 2.x as well as the .NET Stack 3.0 version.

Bug 25953: Stack Build Template selects wrong version number.

A user ran into a case where the Assembly Version Number was getting set incorrectly. The main issue was that the user had commented out the existing line (which says by default that the version is 1.0.0.0) and added below it the new line specifying the correct version (which was something like 3.0.14.0). The regular expression that the .NET Stack uses was not checking for comments, so it grabbed the first one it found. The lesson learned here is not to leave a commented line containing the version number format above the actual version number specification.

This page was last modified on 7 December 2012, at 16:40.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.