ASP.NET MVC + AD + Windows Authentication: How to Logout

19/03/2010 – 1:23 pm

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…..

Microsoft Chart Controls for Microsoft .NET Framework 3.5

17/03/2010 – 10:11 am

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

Coolest Menu and Navigation Jquery Plugins

25/08/2009 – 6:46 pm
Here are the 11 most extraordinary menu and navigation jquery plugins i could find. Hope you like them, i know i do.

jQuery Context Menu Plugin

1

Demo Visit


LavaLamp Navigation

1

Demo Visit


jQuery iPod-style Drilldown Menu

1

Demo Visit


jdMenu Hierarchical Menu Plugin for jQuery

1

Demo Visit


Superfish

1

Demo Visit


Accordion

1

Update: The Accordion plugin was embedded as widget into the last release of jQuery UI (http://jqueryui.com) so this version won’t be updated anymore – Thanks to Simone D’Amico for pointing that out.

Demo Visit


jSlickmenu

1

Demo Visit


jQuery Menu Effect Plugin

1

Demo Visit

jQuery (mb)Menu 2.7 (New!)

1

Demo Visit


jqDock v1.2

1

Demo Visit


Kwicks

1

Demo Visit

Enjoy!!

Via tust

jqGrid + Linq + Asp.Net MVC example

15/08/2009 – 3:07 pm

For those who want get working these tools/frameworks and achieve a grid like this:

jqgrid linq mvc example

Okey, if you like that, this is the stuff used to get it work:

Download the code example here.

The application was based on the well known example from haacked.com

Procesadores AMD: Conozca el portafolio de soluciones y sus rendimientos

03/07/2009 – 9:52 am
Las diversas necesidades de sus clientes encuentran respuesta en el amplio rango de procesadores que AMD le ofrece para todo tipo de PCs. Aquí le mostramos el portafolio de productos actualizado que continuará la transición hacia la nueva línea durante el segundo semestre. Además descubra los diferentes rendimientos que le brindan estas plataformas.
Los recientes lanzamientos han incluido las diversas necesidades que los clientes e integradores manifestaron para su gran variedad de PCs y Notebooks.

El portafolio actualizado para el segundo semestre de este año de procesadores Phenom y Athlon puede verse en el gráfico que acompaña esta nota; como se ve estamos en un proceso de transición en el cual todavía conviven productos de primera generación con los nuevos modelos de Athlon II y Phenom II, proceso de actualización tecnológica que deberá finalizar a fin del año.

También hay algunos datos que los integradores y Resellers deben tener en cuenta a la hora de evaluar cuál es la mejor opción entre estas soluciones para cada necesidad de sus clientes y que se relacionan con el rendimiento y performance de cada uno de estos microprocesadores.

Los detalles
En la familia Athlon se viene la nueva generación de Athlon II, basado en el mismo núcleo que los poderosos Phenom II. En esta opción (AMD Athlon II X2 250), se confirma una serie de mejoras en la performance especialmente relacionadas con la frecuencia (3000 MHz); una mayor velocidad en el bus de datos (4000 Gt/s), y una sensitiva reducción en el consumo energético que caerá hasta los 65 watts, y responderá al proceso de fabricación de 45 nm. Para los memoriosos, estas especificaciones concuerdan con aquel mítico y poderoso Athlon FX (3Ghz, 2Mb cache L2) pero con la ventaja de una arquitectura más moderna, y con la mitad del consumo.

Otro punto interesante es que el AMD Athlon II X2 250 podrá trabajar con memorias DDR2, como en la versión anterior; pero también podrá trabajar con el más reciente estándar DDR3, dando la flexibilidad al cliente de decidir el mejor momento para realizar esta transición.

En otras palabras, los próximos AMD Athlon II X2 250 ofrecerán más performance, más eficiencia y más compatibilidad.

Algunos Benchmarks
La serie de comparativas de rendimiento relacionadas con medios y soportes digitales, los micros Athlon II X2 250, obtienen una significativa ventaja respecto de los X2 anteriores, incluso de modelos relativamente nuevos como el X2 7750, reduciendo a la vez el consumo.

Fuente: ITSitio

Microsoft Researches a Browser-based OS, Code Name Gazelle

01/07/2009 – 12:44 pm

A Microsoft Research team led by Helen J. Wang has created Gazelle (PDF), a browser-based OS, with the declared intent to tighten security when going online.

Gazelle is not a new operating system like Windows but a new type of browser that has a kernel acting as a multi-principal operating system responsible for managing resource protection and sharing resources between various web site principals. A security principal is “an entity that can be authenticated by a computer system or network. Authentication is the process of validating and confirming the identity of such an entity.” Janie Chang, a Microsoft Research team member, defines what a browser principal is and explains why adequate security matters:

In browser parlance, a principal generally equates to a Web site. Given that there is usually just one user at a time on a PC, the sharing of resources is actually across applications from different origins; in the case of Web pages, each page could consist of content from different principals, each staking out a share of computing resources. The browser is therefore the natural choice of application platform for managing principals and resource requests.

A Web page might offer content such as ads or newsfeeds from other Web-site principals. Yet to the browser, all these principals coexist in the same process or protection domain. An ad containing malicious or poorly written code could hog the network connection, degrade performance, freeze the entire page, or crash the browser. In a browser operating system, a “bad” principal would not be allowed to affect other principals, the browser, or the host machine.

Wang et al. define a principal as a web site “defined in the same-origin policy (SOP), which is labeled by a web site’s origin, the triple of (protocol, domain name, port).” To enforce principal protection, a browser kernel is introduced between the principals and the operating system as shown in Figure 1:

gazelle

The browser kernel runs in a separate protection domain and interposes between browser principals and the traditional OS. The browser kernel mediates the principals’ access to system resources and enforces security policies of the browser. Essentially, the browser kernel functions as an operating system to browser principals and manages the protection and sharing of system resources for them. The browser kernel also manages the browser chrome, such as the address bar and menus. The browser kernel receives all events generated by the underlying operating system including user events like mouse clicks or keyboard entries; these events are then dispatched to the appropriate principal instance. When the user navigates a window by clicking on a hyperlink that points to an URL at a different origin, the browser kernel creates the protection domain for the URL’s principal instance (if one doesn’t exist already) to render the target page, destroys the protection domain of the hyperlink’s host page, and re-allocates and re-initializes the window to the URL’s principal instance.

Wang et al. compare current security measures existing in Google Chrome with those implemented in Gazelle. Google Chrome has the following process models: monolithic process, process-per-browsing-instance, process-per-site-instance, and process-per-site. A browsing instance is made up of all interconnected windows, frames and sub-frames, while a site instance is a collection of pages coming from the same site and existing within a browsing instance. Finally, a site is defined as “set of SOP origins that share a registry-controlled domain name: for example, attackerAd.socialnet.com, alice.profiles.socialnet.com, and socialnet.com share the same registry-controlled domain name socialnet.com, and are considered to be the same site or principal by Chrome.” According to Wang et al.,

Chrome uses the process-per-site-instance model by default. Furthermore, … Chrome’s current implementation does not support strict site isolation in the process-per-site instance and process-per-site models: embedded principals, such as a nested iframe sourced at a different origin from the parent page, are placed in the same process as the parent page. The monolithic and process-per-browsing-instance models in Chrome do not provide memory or other resource protection across multiple principals in a monolithic process or browser instance. The process-per site model does not provide failure containment across site instances. Chrome’s process-per-site-instance model is the closest to Gazelle’s two processes-per principal- instance model, but with several crucial differences: (1) Chrome’s principal is site (see above) while Gazelle’s principal is the same as the SOP principal. (2) A web site principal and its embedded principals co-exist in the same process in Chrome, whereas Gazelle places them into separate protection domains. Pursuing this design led us to new research challenges including cross-principal display protection. (3) Plugin content from different principals or sites share a plugin process in Chrome, but are placed into separate protection domains in Gazelle. (4) Chrome relies on its rendering processes to enforce the same-origin policy among the principals that co-exist in the same process. These differences indicate that in Chrome, cross-principal (or - site) protection takes place in its rendering processes and its plugin process, in addition to its browser kernel. In contrast, Gazelle’s browser kernel functions as an OS, managing cross-principal protection on all resources, including display.

Comparing Gazelle with IE8, Wang et al. notice that

IE 8 uses OS processes to isolate tabs from one another. This granularity is insufficient since a user may browse multiple mutually distrusting sites in a single tab, and a web page may contain an iframe with content from an untrusted site (e.g., ads).

The overall conclusion of the research team is:

Fundamentally, Chrome and IE 8 have different goals from that of Gazelle. Their use of multiple processes is for failure containment across the user’s browsing sessions rather than for security. Their security goal is to protect the host machine from the browser and the web; this is achieved by process sandboxing. Chrome and IE 8 achieved a good milestone in the evolution of the browser architecture design. Looking forward, as the world creates and migrates more data and functionality into the web and establishes the browser as a dominant application platform, it is critical for browser designers to think of browsers as operating systems and protect web site principals from one another in addition to the host machine. This is Gazelle’s goal.

A Gazelle prototype has been built on IE7 using its backward compatibility parsing, DOM management and JavaScript engine. The performance of the browser is reported as comparable with that of IE8 and Google Chrome. Cross-origin script source protection is addressed by using the architecture shown in Figure 2. The idea is to sandbox the plug-in code in order to isolate any malicious activities and also let the browser run in case the plug-in fails.

This research project raises many eyebrows of those fearing Microsoft has not ceased their plan to fully incorporate a browser in the operating system. Such a move would certainly be a major blow to many companies because the browser tends to be the dominant application on the desktop. Microsoft assures us that this is not their intent but rather to increase browsing security. Currently, Gazelle is just a research project and only time will show if it will become a product or at least if it will be incorporated in IE and what room is left for other browsers and online applications running on Windows.

Fuente: InfoQ

Microsoft OracleClient Deprecated

01/07/2009 – 12:43 pm

Microsoft announced System.Data.OracleClient will be deprecated after .NET 4.0. Classes in the namespace will be marked obsolete in .NET 4.0 and removed from future releases. OracleClient is the ADO.NET provider for Oracle developed by Microsoft and shipped as part of the .NET Framework Class Library.

This decision has sparked controversy among the community of .NET developers working with Oracle. While many enterprise .NET applications use a 3rd party Oracle provider, System.Data.OracleClient is often used in small applications and typically has better integration with other Microsoft tools.

Microsoft insists this decision was made after much deliberation and research:

After carefully considering all the options and talking to our customers, partners, and MVPs it was decided to deprecate OracleClient as a part of our ADO.NET roadmap.

Part of the reasoning for this decision is the increasingly availability and improvements of 3rd party ADO.NET data providers for Oracle. There have been significant performance improvements and enhanced multi-version compatibility among the popular Oracle providers:

Despite the community backlash, Microsoft has shown no signs of reversing the decision, and none should be expected. Microsoft’s official line is that “many of the third party providers are able to consistently provide the same level of quality and support that customers have come to expect from Microsoft.” Therefore, it’s not worth the investment to bring OracleClient up to parity with the third party providers, and this frees MS resources to focus on ADO.NET.

Some are calling this move an underhanded strike to raise the bar for .NET development against Oracle, but many are viewing this decision with a guarded optimism that Microsoft might be rethinking its not-invented-here bias. For example, it is a common complaint among the ALT.NET crowd that Microsoft reinvents the wheel for no reason, creating their own versions of products when good alternatives already exist. See MSTest vs. NUnit or Entity Framework vs. NHibernate. In the context of recent decisions to officially support jQuery and provide the source code for ASP.NET MVC, this decision could be interpreted as Microsoft further admitting that it doesn’t need to control the entire stack; they can rely on their partners and the community to provide some pieces.

Fuente: InfoQ

Firefox 3.5 finalmente disponible en argentino, español, mexicano y chileno

01/07/2009 – 12:40 pm

¡Finalmente llegó Firefox 3.5! Luego de varias versiones casi listas que se fueron lanzando las últimas semanas, hoy se ha lanzado oficialmente la versión terminada y apta para consumo público de nuestro navegador favorito.

Firefox 3.5

Aparte de todas las novedades que trae la nueva versión del navegador, una de las más interesantes para la comunidad Latinoamericana es la suma de dos nuevas localizaciones oficiales del navegador. Para sumarse a la versión para España y para Argentina de Firefox, ha llegado una versión específica para Chile y otra para México. Ahora finalmente para quienes nos importa la diferencia entre Descargá y Descarga podremos usar el principal navegador libre localizado a nuestra variante del idioma español.

A continuación la lista de mejoras de Firefox 3.5 y los enlaces para descargar las versiones localizadas.

Esta es la lista de mejoras copiada y pegada desde el sitio de la Fundación Mozilla:

Firefox 3.5 está basado en la plataforma de representación Gecko 1.9.1, que ha estado en desarrollo desde el año pasado. Firefox 3.5 ofrece muchos cambios sobre la versión anterior, implementando nuevas tecnologías web, y mejorando el rendimiento y facilidad de uso. Algunas de las características más notables son.

* Disponible en más de 70 idiomas (¡consigue tu versión localizada!)
* Implementación de los elementos y de HTML 5, incluyendo audio codificado en Vorbis y vídeo codificado en Ogg Theora de manera nativa (¡Pruébalo aquí!)
* Herramientas mejoradas para controlar tus datos privados, incluyendo un modo privado de navegación.
* Mejor rendimiento en aplicaciones web usando el nuevo motor de JavaScript TraceMonkey.
* La capacidad de compartir tu posición geográfica con sitios web usando navegación basada en la ubicación (¡Pruébalo aquí!)
* Implementación de JSON nativo, y múltiples hilos de ejecución web (web worker threads).
* Mejoras al motor de representación Gecko, incluyendo interpretación especulativa para una representación del contenido más rápida.
* Implementación de nuevas tecnologías web tales como: tipografías descargables, consultas de medios CSS, nuevas transformaciones y propiedades, selectores de consutas JavaScript, almacenamiento local de HTML5 de aplicaciones en modo sin conexión, texto , perfiles ICC, y transformaciones SVG.

Sin contar que según Mozilla, Firefox 3.5 es 2 veces más rápido que Firefox 3 y hasta 10 veces más rápido que Firefox 2 interpretando JavaScript, algo cada vez más común en sofisticadas aplicaciones web como Gmail.

Fuente: RedUsers

Developing Mobile Applications (Part I)

08/06/2009 – 12:25 pm

Part I: Pre-requisites and installation.

Hi, in this series of posts we are going to explain how to develop data Mobile applications. The selected platform was Visual Studio 2008 Team System Edition + C# + Windows Mobile 6 + Pocket PC Device Emulator (we don’t have decided the deployment hardware yet).

First of all let enumerate the required software:

Brief description of each component:

Visual Studio                  vs2008

We need any Visual Studio which edition supports smart devices development; we can also use Visual Studio 2005 (standard or professional edition). When installing do not forget to check the Smart Devices section. Remember we need the SQL Server Compact Edition and the Compact Framework.

Windows Mobile SDK       wm

For developing Windows Mobile 6 application we need to install the SDK because this is not included in Visual Studio 2008 Team System. This SDK includes devices images for the emulator, documentation, samples, etc… If you need instead of SDK for WM 6 you can install the Windows Mobile 6.5 Developer Tool Kit from here.

Microsoft ActiveSync 4.5 activesync

ActiveSync acts as the gateway between your Windows-based PC and Windows Mobile-based device, enabling the transfer of Outlook information, Office documents, pictures, music, videos and applications to and from your device. If you are only going to use the device emulator only or you don’t have the real Pocket PC yet, you don’t need to have installed ActiveSync; ActiveSync connects the real device with your pc. Download from here.

Note: Microsoft ActiveSync Works up to Windows XP SP2 version. If you have Windows Vista you should use Windows Mobile Device Center 6.1 available from here.

MyGeneration           mygeneration

MyGeneration is an extremely flexible development tool written in Microsoft .NET. MyGeneration generates code from templates that can be written in C#, VB.NET, JScript, and VBScript. MyGeneration is great at generating ORM architectures or O/R Mapping files for architectures such as Gentle.NET, Opf3, NHibernate, and others. The meta-data from your database is made available to the templates through the MyMeta API. MyGeneration supports a lot off databases systems including SQL Server CE.

Note: For using MyGeneration with SQL Server CE 3.5 you must install the latest version (now 1.3.1 pre-alpha) or MyGeneration will not connect to 3.5 CE database. The “hard way” is downloading the source code of MyMeta.Plugins.SqlCe.dll plug-in, first open it with VS 2008 so all the references to previous SQL Server CE are updated, then compile the library and replace it in the installation folder of MyGeneration.

OK! Now where are ready to start our mobile project.

newproject

And we can deploy it to a Pocket PC running Windows Mobile 6

deploy

emulator

NHibernate 2.1alpha3 ready

25/05/2009 – 8:19 pm

Yes, NHibernate 2.1alpha3 is ready to download. Have a look the release notes.

You can download here. See the official announce.