Archive for March, 2010

In ASP.NET MVC applications using Windows Authentication against a domain, we have two possible ways to login:

1) If the user is on a PC added to the domain,  login to the application is not needed becasue it is done automatically with the user’s credentials

2) If the user wants to use the application from a PC outside de domain, he must enter his username/password

In this second case, probably the user wants to logout after using the app. How can we do this ?

As we can’t clear our credentials using .Net code, we must “logout” using Javascript. Thus is, clear the authentication cache.

In the Header section we must add this code:Logout

And in the body section we call this function:

<a href=”../../Default.aspx” onclick=”javascript:Logout();”>[ Salir ]</a>

Notes: this code works fine on IE 6 + SP1 or higher. Otherwise, the user must close all broser’s windows in order to logout.

Hope you find this usefull…..

Be the first to comment

Microsoft has provided a number of charting controls that can be downloaded for free and included in .NET 3.5 ASP.NET or WinForms projects. To use them with Visual Studio 2008, one needs to install an add-on that provides VS toolbox and intellisense integration. These controls are now included in .NET 4.0, so an additional download and installation won’t be necessary. Samples Environment for MS Chart Controls contains examples of these controls. Below is a selection of such samples:

Links:

Download Controls

Samples

Be the first to comment