Monthly Archives: February 2011

Dynamic definition of the list of available languages for an ASP.NET web page

Learn how to dynamically define a list of available languages for an ASP.NET web page.

Basic Authentication on a WCF REST Service

An assembly that adds Basic Authentication to an IIS hosted WCF REST service to validate against any back-end.

CodePlex Daily Summary for Monday, February 28, 2011

CodePlex Daily Summary for Monday, February 28, 2011

Popular Releases

  • Facebook Graph Toolkit: Facebook Graph Toolkit 1.0: Refer to http://computerbeacon.net for Documentation and Tutorial New features:added FQL support added Expires property to Api object added support for publishing to a user's friend / Facebook Page added support for posting and removing comments on posts added support for adding and removing likes on posts and comments added static methods for Page class added support for Iframe Application Tab of Facebook Page added support for obtaining the user's country, locale and age in If…
  • ASP.NET MVC Project Awesome, jQuery Ajax helpers (controls): 1.7.1: A rich set of helpers (controls) that you can use to build highly responsive and interactive Ajax-enabled Web applications. These helpers include Autocomplete, AjaxDropdown, Lookup, Confirm Dialog, Popup Form, Popup and Pager small improvements for some helpers and AjaxDropdown has Data like the Lookup except it's value gets reset and list refilled if any element from data gets changed
  • Managed Extensibility Framework: MEF 2 Preview 3: This release aims .net 4.0 and Silverlight 4.0. Accordingly, there are two solutions files. The assemblies are named System.ComponentModel.Composition.Codeplex.dll as a way to avoid clashing with the version shipped with the 4th version of the framework. Introduced CompositionOptions to container instantiation CompositionOptions.DisableSilentRejection makes MEF throw an exception on composition errors. Useful for diagnostics Support for open generics Support for attribute-less registr…
  • PHPExcel: PHPExcel 1.7.6 Production: DonationsDonate via PayPal via PayPal. If you want to, we can also add your name / company on our Donation Acknowledgements page. PEAR channelWe now also have a full PEAR channel! Here's how to use it: New installation: pear channel-discover pear.pearplex.net pear install pearplex/PHPExcel Or if you've already installed PHPExcel before: pear upgrade pearplex/PHPExcel The official page can be found at http://pearplex.net. Want to contribute?Please refer the Contribute page.
  • WPF Application Framework (WAF): WPF Application Framework (WAF) 2.0.0.4: Version: 2.0.0.4 (Milestone 4): This release contains the source code of the WPF Application Framework (WAF) and the sample applications. Requirements .NET Framework 4.0 (The package contains a solution file for Visual Studio 2010) The unit test projects require Visual Studio 2010 Professional Remark The sample applications are using Microsoft’s IoC container MEF. However, the WPF Application Framework (WAF) doesn’t force you to use the same IoC container in your application. You can use …
  • VidCoder: 0.8.2: Updated auto-naming to handle seconds and frames ranges as well. Deprecated the {chapters} token for auto-naming in favor of {range}. Allowing file drag to preview window and enabling main window shortcut keys to work no matter what window is focused. Added option in config to enable giving custom names to audio tracks. (Note that these names will only show up certain players like iTunes or on the iPod. Players that support custom track names normally may not show them.) Added tooltips …
  • SQL Server Compact Toolbox: Standalone version 2.0 for SQL Server Compact 4.0: Download the Visual Studio add-in for SQL Server Compact 4.0 and 3.5 from here Standalone version of (most of) the same functionality as the add-in, for SQL Server Compact 4.0. Useful for anyone not having Visual Studio Professional or higher installed. Requires .NET 4.0. Any feedback much appreciated.
  • Chiave File Encryption: Chiave 0.9.2: Release Notes Application for file encryption and decryption using 512 Bit rijndael encyrption algorithm with simple to use UI. Its written in C# and compiled in .Net version 3.5. It incorporates features of Windows 7 like Jumplists, Taskbar progress and Aero Glass. Now with added support to Windows XP! Change Log from 0.9.1 to 0.9.2: ==================== Added: > Now it displays number of files added in the wizard to the Window Title bar. > Added support to Windows XP. > Minor UI tweaks. I…
  • Claims Based Identity & Access Control Guide: Drop 1 – Claims Identity Guide V2: Highlights of drop #1 This is the first drop of the new "Claims Identity Guide" edition. In this release you will find: All previous samples updated and enhanced. All code upgraded to .NET 4 and Visual Studio 2010. Extensive cleanup. Refactored Simulated Issuers: each solution now gets its own issuers. This results in much cleaner and simpler to understand code. Added Single Sign Out support. Added first sample using ACS ("ACS as a Federation Provider"). This sample extends the ori…
  • Simple Notify: Simple Notify Beta 2011-02-25: Feature: host the service with a single click in console Feature: host the service as a windows service Feature: notification cient application Feature: push client application Feature: push notifications from your powershell script Feature: C# wrapper libraries for your applications
  • Mono.Addins: Mono.Addins 0.6: The 0.6 release of Mono.Addins includes many improvements, bug fixes and new features: Add-in engine Add-in name and description can now be localized. There are new custom attributes for defining them, and can also be specified as xml elements in an add-in manifest instead of attributes. Support for custom add-in properties. It is now possible to specify arbitrary properties in add-ins, which can be queried at install time (using the Mono.Addins.Setup API) or at run-time. Custom extensio…
  • patterns & practices: Project Silk: Project Silk Community Drop 3 – 25 Feb 2011: IntroductionWelcome to the third community drop of Project Silk. For this drop we are requesting feedback on overall application architecture, code review of the JavaScript Conductor and Widgets, and general direction of the application. Project Silk provides guidance and sample implementations that describe and illustrate recommended practices for building modern web applications using technologies such as HTML5, jQuery, CSS3 and Internet Explorer 9. This guidance is intended for experien…
  • PhoneyTools: Initial Release (0.1): This is the 0.1 version for preview of the features.
  • Minemapper: Minemapper v0.1.5: Now supports new Minecraft beta v1.3 map format, thanks to updated mcmap. Disabled biomes, until Minecraft Biome Extractor supports new format.
  • Umbraco CMS: Umbraco 4.7: Service release fixing 31 issues. A full changelog will be available with the final stable release of 4.7 Important when upgradingUpgrade as if it was a patch release (update /bin, /umbraco and /umbraco_client). For general upgrade information follow the guide found at http://our.umbraco.org/wiki/install-and-setup/upgrading-an-umbraco-installation 4.7 requires the .NET 4.0 framework Web.Config changes Update the web web.config to include the 4 changes found in (they're clearly marked in…
  • HubbleDotNet – Open source full-text search engine: V1.1.0.0: Add Sqlite3 DBAdapter Add App Report when Query Cache is Collecting. Improve the performance of index through Synchronize. Add top 0 feature so that we can only get count of the result. Improve the score calculating algorithm of match. Let the score of the record that match all items large then others. Add MySql DBAdapter Improve performance for multi-fields sort . Using hash table to access the Payload data. The version before used bin search. Using heap sort instead of qui…
  • Silverlight????[???]: silverlight????[???]2.0: ???????,?????,????????silverlight??????。
  • DBSourceTools: DBSourceTools_1.3.0.0: Release 1.3.0.0 Changed editors from FireEdit to ICSharpCode.TextEditor. Complete re-vamp of Intellisense ( further testing needed). Hightlight Field and Table Names in sql scripts. Added field dropdown on all tables and views in DBExplorer. Added data option for viewing data in Tables. Fixed comment / uncomment bug as reported by tareq. Included Synonyms in scripting engine ( nickt_ch ).
  • IronPython: 2.7 Release Candidate 1: We are pleased to announce the first Release Candidate for IronPython 2.7. This release contains over two dozen bugs fixed in preparation for 2.7 Final. See the release notes for 60193 for details and what has already been fixed in the earlier 2.7 prereleases. – IronPython Team
  • Caliburn Micro: A Micro-Framework for WPF, Silverlight and WP7: Caliburn.Micro 1.0 RC: This is the official Release Candicate for Caliburn.Micro 1.0. The download contains the binaries, samples and VS templates. VS Templates The templates included are designed for situations where the Caliburn.Micro source needs to be embedded within a single project solution. This was targeted at government and other organizations that expressed specific requirements around using an open source project like this. NuGet This release does not have a corresponding NuGet package. The NuGet pack…

New Projects

  • AutoDiff: High-performance and high-accuracy automatic function-differentiation library suitable for optimization and numeric computing.
  • Eburgfoto: fotoservice
  • E-Mail Marketing Server: Criação de um E-Mail Marketing Server Tecnologias Aplicacadas: ASP.NET VB.NET Entity Framework 4 DevExpress Components Integração com SmarterMail Precisamos de Ajuda para: - Layouts CSS - E-Mail Templates
  • F# WPF Application Template with Themes: An F# Template which generates a simple WPF application with themes.
  • FAST Search for Sharepoint 2010 Query Logger: The FS4SP query logger will make it easier for developers and IT pro's to debug user queries.
  • FoxPress CMS: FoxPress is a totally free and Open Source Content Management System (CMS) you can use to create a beautiful website. From Fortune 500 site to busy e-commerce shopping hub to personal blog, FoxPress is simple to use and simple to implement. Performance and scalability are key.
  • IISAppPoolTM: IISAppPoolTM allows you to control IIS 7.0 application pool right from you windows system tray. You no longer have to go through IIS management console and to manage your application pool. Do it directly from you Windows taskbar! IISAppPoolTM is developed in C#.
  • JobTrends: Job Trends
  • London: Project "London" is a futuristic crowd-sourcing system. We are currently in development and expect to ship in the summer of 2011.
  • pgnSoft Framework: Complete Framework for Busines, games and casual system developers.
  • Prompt Instantiator – Simple Dependency Injector: Prompt Instantiator is simple lightweight dependency injector for .NET and Silverlight.
  • SjscV5: Sjsc Application V5
  • SSIS Batch Geocoder: SSIS Batch Geocoder is a SQL Server 2008 R2 Integration Services (SSIS) data flow transformation that geocodes addresses in the pipeline using the Bing Maps Geocode Dataflow.
  • SurveySL: Survey
  • User authentication against active directory: Portable tool, winform. Check user name and password against active directory. Green software (no installation).
  • XAMLtoMVC dynamic image generator: XAMLtoMVC was created to ease tasks in web development when you have something to display that is impossible (or nearly impossible) with html. And especially with images you want to use, but you realize you can't because they are too static to reflect even the smallest changes.
  • Xray – for your Ioc: Visualise the contents of an IoC container. this is a developer tool to show the dependency graph registered in the IoC container.
  • ???????????: ???????? «???????????», ???????????? ? ?????? ?????????????? ??????????? ???????? ?? C#. ???????? ?? C#.
  • ??C#??SEED????????: ???????????????????, ??C#???SEED(The Standard for the Exchange of Earthquake Data)????????, ????????????,??? ??SEED ???????、????????。

Gamer Spotlight: Waterborn 2o2p

He’s a member of the 2old2play website but he’s certainly NOT too old to play the latest games. Meet Waterborn 2o2p in our Xbox.com Gamer Spotlight!

Prise de dumps avec WER

Bonjour,

Je vous partage un paramétrage qui peut être très utile sur un serveur de production (ou sur votre pc) afin d’investiguer après coup sur l’origine de crashes applicatifs. Vous allez me dire : mais on sait déjà faire en branchant un débogueur comme Adplus ou avec DebugDiag! Oui, effectivement. La subtiité est que je vous propose de faire cette prise de dumps sans avoir de composant ou service actif à mettre en place qui “surveillerait” les processus. En effet, nous utilisons la fonctionnalité WER (Windows Error Reporting) fournit par Windows. 

Le paramétrage est tout simple : une ruche avec trois valeurs dans le registre :

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps

  • DumpFolder : Chemin vers le répertoire dans lequel enregistrer les dumps
  • DumpCount : Nombre maximum de dumps pouvant être créés
  • DumpType : Type de dump à créer (1 pour mini dump et 2 pour full dump)

 Voici un exemple que vous pouvez utiliser avec comme répertoire de sortie C:\Dumps :

 

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
“DumpFolder”=hex(2):43,00,3a,00,5c,00,44,00,75,00,6d,00,70,00,73,00,00,00
“DumpCount”=dword:00000010
“DumpType”=dword:00000002

 

A noter qu’il vous est possible d’effectuer ce paramétrage seulement pour un processu donnée (et non pour tous les procesus). Dans ce cas, il suffit de créer une sous-ruche portant le même nom que l’éxécutable et ayant la même structure :

 

 

La référence MSDN est la suivante : http://msdn.microsoft.com/en-us/library/bb787181(VS.85).aspx 

A bientot,

Sebastien.

The State of Axum

Those who have followed this blog will have noticed that it’s been a long time since we posted anything new about Axum, and the time has come to state publicly that which may have been clear to some but not others, that we’re not currently pursuing productization.

We have seriously examined the possibility of releasing the source code under an OSS license, but that, too, will require time that we don’t have that much of. At this time, no one is assigned paid hours to work on Axum, but we are still entertaining fantasies about an open-source release sometime in the future by doing some extra work during down times.

That said, the incubation effort was very successful in our opinion: several of the concepts embodied in Axum live on in the next versions of C# and .NET: C# and VB will support their own form of asynchronous methods, while .NET is adding support for data-flow constructs following the patterns we set up in Axum and the C++ concurrency runtime.

On the other hand, the concepts around safe parallelism and agent-based programming were seen by many as too far outside the mainstream to be adopted now in languages like C# and VB. The idea of Axum was to not force these concepts on general-purpose languages, so those of us who have work on Axum are not surprised.

It’s disappointing to have to post this kind of entry, but it’s better to acknowledge the situation than to stick our heads in the sand and pretend that everything’s OK.

 

Niklas, Artur & Josh
Axumites

February Microsoft Tech Student of the Month – Robert Klenka

RobertIt’s time to profile our third Tech Student of the Month, featuring a student whom we feel is using the Microsoft platform and development toolset to do something exceptional. For the month of February we have chosen Robert Klenka, a junior at the University of Texas – Arlington who is studying Computer Science and Engineering. Robert is already selling his apps in the Windows Phone Marketplace and has written code that is being used on fighter jets!

Robert’s interest for computers started at an early age when he was inspired by his father’s work as an engineer at General Electric. Robert became fascinated by computer programming because it allowed him the freedom to create anything he desired. His interest in Web Design lead him to create his first website by the time he was in Middle School. He taught himself how to create websites from scratch by searching for articles and tutorials online as well as toying with the NetScape Composer. Robert continued to develop his web designing skills and was later given an opportunity to create a website for a local gun club. His experiences here allowed him to improve upon his skill set and learn how to work with a real client for the first time. Consequently, he has been managing the same site for 10 years now.

Robert was unable to take programming classes until his Junior Year in high school, so he decided to work and study on his own. Once Robert became a junior, he was excelling in his programming classes having already received a CompTIA A+ and Cisco Certification. It was then that he realized he wanted to pursue a degree in Computer Science after graduating. Klenka enrolled in a local community college to build up his knowledge base about programming and then went to the University of Texas – Arlington. Here, he began to learn new languages like C# and ASP.NET using Microsoft tools like Visual Studio provided by his school’s MSDNAA license and the DreamSpark program.

In the summer of his freshman year at UTA, Robert got the opportunity to combine his passions for programming and aeronautics as an intern at Lockheed Martin. During this first internship at Lockheed Martin, Robert was involved in an independent research and development group where he was able to assist with the design of an airplane chip benchmarking process. He worked on the creation of a mining program that combined three different types of airplane chip data into one using C++. In addition, Robert was given a unique opportunity to put together a first generation Microsoft Surface and write some apps for it.

Robert spent another two summers interning for Lockheed Martin. In his second term, he worked with a fellow intern on updating all of the planes’ Java code from version 1.3 to 1.5. This code enabled Lockheed Martin to determine different airplane electronic capabilities and is now being used on the aircraft-manufacturing floor. By his third summer at Lockheed, Robert was given the opportunity to work on the embedded software of the F-35 Lighting Joint Strike Fighter Jet using C++. Unfortunately, Robert could not expand more, deeming it ‘classified.’ Nonetheless, his code is being used on real fighter jets. Cool!

P90X ManagerNow that he has finished his internship at Lockheed Martin, Robert is planning to take more advanced CS classes in his senior year. He is taking advantage of this free time to work on several personal projects such as a Windows Mobile application called OBDMobile. The idea for the app started when Robert asked himself, “How can I talk to my car?” He explored how to answer this question by experimenting with his beloved Dodge truck to create an on board diagnostics kit that could check information from his car. Robert sought advice from local shops but nobody wanted to help him because it would compete with expensive products that the shops were already selling. This gave him even more motivation to build the solution himself. He used his laptop to read the data from his car and built a user interface using Windows Presentation Foundation (WPF) and Microsoft Expression Studio 3 (both of which are available to students for free on the DreamSpark website). Now Robert was truly “talking to his car” by getting all sorts of information such as RPM, MPH, cooling temperatures, lights, etc. Robert took his achievement further when he ported the app to run on his phone using Windows Mobile 6.5. OBDmobile is being sold on the Windows Phone Marketplace today for .99. Thanks to DreamSpark Robert was able to register his application to the App Hub for free and has had over 100 downloads from people using his app all over the world. Not a bad way to pay for books!

Since the release in November, Robert has gone on to create a few apps for Windows Phone 7. He finds the new operating system so easy to develop for that he can create a new app in almost no time. Robert has made a lite version of OBDmobile to run on Windows Phone 7 along with new apps called FlickPick and P90X Manager. FlickPick allows you to make quick decisions by loading in a list of options and then shaking the device to pick one of them. P90X Manager helps you track your workouts and nutrition to stay in shape on the go!

We wish Robert the best of luck and hope that he enjoys learning advanced programming skills in his senior year!

Join our Microsoft Tech Student community on Facebook and tell us your story!

Visit Robert Klenka’s website

Read last month’s Tech Student Profile on Den Delimarsky

 

 

Silicon Valley Web Camp Report 2/26/2011

This past Saturday, I was involved in a presentation to over 180 developers at the Silicon Valley Web Camp event, a free training event for developers run by Microsoft. I presented a session on data access and co-presented some follow-up sessions with Michael Palermo (@mpalermo) who knocked it out of the park!

We covered all kinds of great stuff: ASP.NET MVC 3, Razor, Entity Framework in the morning. Dr. Doris Chen (@doristchen), the local Developer Evangelist for Silicon Valley, presented the rest of the afternoon on jQuery, AJAX and other client technologies.

Of course, the demo goblins ate me up and it snowballed but I think that overall I did a great job of making my point. I blame lack of sleep over the last couple of weeks Smile

Here’s a pic (Palermo’s presenting and I’m monkey boy on the PC for this one).

It's a tiny me, way up there!

Here’s another one of me helping some folks – this is where the REAL value is, getting one-on-one help from the experts!

I need a haircut.

 

Palermo and I presented some custom content not available in the WebCamp training kit. If you’d like to use it, you can download it here.

Upcoming Redmond, WA Web Camp

I will be presenting at another Web Camp locally here in Seattle, so if you are in the area, please register and stop by on March 25th at the Mixer in Redmond!

Controles, estadísticas y dineros (para grupos de usuarios)

El Miércoles 16 de Febrero, en colaboración con Telerik y PreEmptive Soltuions, se lanzó una oferta para los grupos de usuarios y sus desarrolladores. La oferta ella se incluye lo siguiente:

- Los controles de Telerik para Windows Phone 7 que te ayudarán a crear grandes aplicaciones

- Las estadísticas de tus aplicaciones de PreEmptive que te ayudarán a controlar y actualizar tu aplicación.

- Una ayuda para potenciar tu grupo de usuarios proporcionando 100$ por cada aplicación válida.

Si creáis y publicáis una aplicación de Windows Phone 7 que haga uso de los controles de Telerik y la solución de estadísticas de PreEmptive para WP7 tu grupo de usuarios recibirá 100$. Tú, como desarrollador obtendrás algunos de los controles de Telerik y las estadísticas de PreEmptive de forma gratuita hasta finales del año 2011.

La oferta está limitada a los primeros 500 participantes. No esperes y envía tus aplicaciones ya. Puedes encontrar más información sobre la promoción en http://www.telerik.com/products/windows-phone/getting-started/user-groups.aspx

clip_image002 clip_image004

Esperamos que os resulte de utilidad.

Saludos,

El equipo de MSDN España

Exploring Asynchronous Design Patterns

 

One programming pattern that could be made easier for the
developer is implementing the IAsyncResult
asynchronous programming pattern. Writing code so it doesn’t block threads is
difficult to do.  It is even more
difficult using this pattern because there are multiple different ways for a
programmer call an operation implementing the pattern.

 

Once you do have a basic implementation, though, it is a
tedious and repetitive task to create asynchronous operations on your classes.  This means that with asynchronous operations there
is an opportunity that the right tools could help make development easier.  Before we can create the tools, we will need a
basic pattern and supporting code.

 

You can find documentation on asynchronous programming in
MSDN, however, as time goes by the documentation gets more heavily weighted
toward the event based pattern. It is increasingly hard to find documentation
on how to use or implement the older pattern. 
The MSDN page for APM is here though.
The other interesting thing is that even the event based pattern may be going
away now as well, in favor of built in language support in C# 5.0 for the Tasks
library (Hint: Search for “AsyncCTP”). This
is a great topic for another post. In the meantime, if you need to support
asynchronous operations using a framework 3.5 and earlier, it may be good to
know one of the previous patterns.

 

Asynchronous
Programming Model Use

Because the documentation is getting scarce, I feel
obligated to give a brief overview of how to use the programming model.
Typically, there are two matching methods on a class with signatures similar to
those shown below:

IAsyncResult
BeginConnect(string host, int port, AsyncCallback userCallback, object state);

void
EndConnect(IAsyncResult result);

 

The
application would typically use the above example methods (from the Socket
class) as follows:

 

IAsyncResult
result = m_socket.BeginConnect(

     m_host,

     m_port,

     this.ConnectCompleted,

     null /*state*/);

 

private void
ConnectCompleted(IAsyncResult result)

{

    try

    {

        m_socket.EndConnect(result);

 

        // Additional code here

    }

    catch (SocketException exception)

    {

        // TODO: Handle exception

    }

}

 

Exceptions
and data (if any) are reported in the EndXXX method when the operation
completes. When implementing this pattern, it is necessary to return an object
that implements the IAsyncResult interface from the Begin method and will be
passed to the callback when completed. There are
ways of blocking threads and waiting synchronously on the operation, but if
your goal is to not block threads then these are hopefully not of interest to
you.

 

You may still
able to find more information on the internet if necessary to understand how
this pattern or even the event based pattern is used.

 

Summary

 

Asynchronous
programming is difficult, and implementing asynchronous operations to prevent
threads from blocking is even more difficult. Once you have done it a few
times, it becomes very tedious to do. 
Many people have given their perspective and coding patterns to
accomplish this task already. Like everyone else, I will quickly give my own
spin on it in the next post, so we can get past that and onto how to make
things easier.