02. July 2008

Haciendo "Off-line" una aplicación Web ASP.NET 2.0

Cuando se necesita hacer una actualización, migración, etc., de alguna aplicación Web, muchas veces es necesario que la aplicación este “off-line”, es decir, que no pueda ser utilizada mientras está siendo modificada para que los usuarios no vean mensajes de error inesperados.

Podríamos decir que hay básicamente 3 formas:

Haciendo un Re direccionamiento del sitio Web directamente en IIS hacía alguna otra URL.

Usando la configuración del módulo httpRunTime en el archivo web.config de la aplicación. Sin embargo, este método no nos permitirá desplegar información al usuario:

XML:
  1. <configuration>
  2.   <appsettings />
  3.      <system.web>
  4.          <httpruntime enable=“false” />
  5.     </system.web>
  6. </configuration>

Otro método más sencillo y efectivo es simplemente colocar un archivo HTML con el nombre App_Offline.htm y la respuesta que recibirán los clientes será el contenido del mismo.

Es importante señalar que en Internet Explorer 6 existe una opción llamada “Show Friendly Http Errors” que puede ser configurada en Tools->Internet Options -> Advanced y por default está habilitada. Cuando esta opción está habilitada y la respuesta del server es un status-code HTTP-200 con un contenido menor a 512 bytes, IE mostrará el friendly error, por lo que el contenido de la página App_Offline.htm debe ser mayor a 512 bytes.

Más info: http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx

10. June 2008

Entity Framework FAQ

Se acerca la liberación del Service Pack 1 del .NET Framework 3.5, lo que significa la disponibilidad del ADO.NET Entity Framework. He aquí una lectura obligada al respecto:

http://blogs.msdn.com/dsimmons/archive/2008/06/06/new-in-version-0-6-of-the-ef-faq.aspx

26. May 2008

Service Pack 1 de Visual Studio 2008 y .NET Framework 3.5

La semana pasada se liberó al público en general la Beta 1 del Service Pack 1 de VS 2008 y .NET 3.5.

Scott Guthrie describe a detalle cuales son las mejoras y nuevas cosas que traerá el Service Pack.

Algo de lo más sobresailente es la inclusión por fin de ADO.NET Entity Framework y su correspondiente LINQ to Entities, que entre muchas otras bondades, agrega el soporte para modelar relaciones M:M que tanto se extrañan en el actual LINQ to SQL:

image

 

Mejor soporte de Intellisense para múltiples frameworks de AJAX/Javascript:

image

Soporte de Intellisense y debugging en ASP clásico!!!??? Jjaaja, esta sí es realmente sorprendente. Supongo que aún deben existir muchas aplicaciones desarrolladas en ASP clásico (tecnología hace casi 10 años a sido substituida por ASP.NET), por lo que se hizo necesario dar esta funcionalidad a Visual Studio 2008:

image

Para el detalle exacto de todo lo que trerá el Service Pack:
http://weblogs.asp.net/scottgu/archive/2008/05/12/visual-studio-2008-and-net-framework-3-5-service-pack-1-beta.aspx

Descarga de la versión BETA:
http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx

15. April 2008

Power Commands para Visual Studio 2008

Power Commands es un conjunto de extensiones que agregan funcionalidades extras al IDE de Visual Studio 2008. Además, son open source, puedes descargar el código fuente aquí.

image

image

image

image

http://www.visualstudiogallery.com/ExtensionDetails.aspx?ExtensionId=df3f0c30-3d37-4e06-9ef8-3bff3508be31

08. April 2008

LINQ y el sistema de archivos

LINQ (en su sabor LINQ to Objects) puede ser una forma muy útil de iterar a través de colecciones de objetos, como por ejemplo para ver la lista de directorios o carpetas en el disco duro devuelta por el método GetDirectories():

C#:
  1. var directorios = from dir in new DirectoryInfo(@”C:\”).GetDirectories()
  2.                         select dir.Name;
  3. foreach (var directorio in directorios)
  4. {
  5.       Console.WriteLine(directorio);
  6. }

01. April 2008

Enterprise Library 4.0, CTP de Marzo

 

Hace un año hablaba sobre la liberación de la versión 3, y hoy encuentro que ya esta disponible la CTP (Community Technology Preview) de Marzo de la versión 4.

Más detalles:

http://blogs.msdn.com/agile/archive/2008/03/31/enterprise-library-4-0-march-2008-ctp-released.aspx

http://www.codeplex.com/entlib

12. February 2008

How To: Use Forms Authentication with Active Directory in ASP.NET 2.0 (y posteriores)

ms998360.pponline(en-us,MSDN.10)

http://msdn2.microsoft.com/en-us/library/ms998360.aspx

11. February 2008

Hot fixes para Visual Studio 2008 (Web Development)

Scott Guthrie publica los detalles sobre esta actualización para el ambiente de desarrollo Web de Visual Studio 2008, que sin duda resuelve varios "detallitos", sobre todo de performance en la vista de diseño, que en algunos momentos se volvía verdaderamente lenta. Sin duda una instalación obligatoria:

Hot Fix Details

You can download this hot-fix roll-up for free here (it is a 2.6MB download).  Below is a list of the issues it fixes:

HTML Source view performance

  • Source editor freezes for a few seconds when typing in a page with a custom control that has more than two levels of sub-properties.
  • “View Code” right-click context menu command takes a long time to appear with web application projects.
  • Visual Studio has very slow behavior when opening large HTML documents.
  • Visual Studio has responsiveness issues when working with big HTML files with certain markup.
  • The Tab/Shift-Tab (Indent/Un-indent) operation is slow with large HTML selections.

Design view performance

  • Slow typing in design view with certain page markup configurations.

HTML editing

  • Quotes are not inserted after Class or CssClass attribute even when the option is enabled.
  • Visual Studio crashes when ServiceReference element points back to the current web page.

JavaScript editing

  • When opening a JavaScript file, colorization of the client script is sometimes delayed several seconds.
  • JavaScript IntelliSense does not work if an empty string property is encountered before the current line of editing.
  • JavaScript IntelliSense does not work when jQuery is used.

Web Site build performance

  • Build is very slow when Bin folder contains large number of assemblies and .refresh files with web-site projects.
Installation Notes

For more information on how to download and install the above patch, please read this blog post here.  In particular, if you are using Windows Vista with UAC enabled, make sure to extract the patch to a directory other than "c:\" (otherwise you’ll see an access denied error).

To verify that this hot-fix patch successfully installed, launch VS 2008 and select the Help->About menu item.  Make sure that there is an entry that says ‘Hotfix for Microsoft Visual Studio Team System 2008 Team Suite – ENU (KB946581)’. 

If you ever want to remove the patch, go to Control Panel -> Add/Remove Programs and select “Hotfix for Microsoft Visual Studio 2008 – KB946581” under Microsoft Visual Studio 2008 (or Visual Web Developer Express 2008) and click “Remove".

Summary

Obviously it goes without saying that we would have liked to have shipped without any bugs.  Hopefully this hot-fix enables you to quickly solve them if you are encountering them.  Thank you to those who helped us identify the causes of these issues, as well as to the group of customers who have helped us verify the above fixes the last few weeks.

Note: If you do encounter issues with VS 2008 features for web development in the future, I recommend always asking for help in the VS 2008 Forum on www.asp.net.  The VS Web Tools team actively monitors this forum and can provide help.

Via

31. January 2008

MSDN Code Gallery

image

Enorme repositorio de código, ejemplos, etc de prácticamente cualquier tecnología Microsoft. Ampliamente recomendable:

http://code.msdn.microsoft.com/

30. January 2008

10 ASP.NET Performance and Scalability Secrets

image

Una excelente y obligada lectura para cualquier desarrollador que utilice ASP.NET sobre como optimizar el peformance de una aplicación Web y hacerla más segura. Este artículo es escrito por Omar Al Zabir autor del libro “Building a Web 2.0 Portal with ASP.NET 3.5” que recomendé en días anteriores:

http://www.codeproject.com/KB/aspnet/10ASPNetPerformance.aspx

« Anteriores   
Powered by Wordpress