What's New in .NET Stack Update 3.2.2?

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.

Moved the check for single sign-on (SSO) to earlier in the page life cycle.

What's New in .NET Stack 3.1?

Features

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

Changes to Registering Stack in Container.

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

Bugs Fixed

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:

In the "Add Library Package Reference" dialog, click on the "Online" tab in the left pane.

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.

Click the Install button for the "LDS Stack Library for Web Applications" packages.

Since the LDS Stack package has a dependency on the Unit package it will automatically get installed at the same time.

When the installation is complete, a green check-mark will be displayed.

Click Close.

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:

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.

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:"

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.