Alliagator Tags Archive for Monday, March 31 2008



DotNetKicks.com Links
wwDataBinder with dictionaries and lists ... This a a small article for those who used wwdatabinder and want to use automatic binding with dictionaries or lists. You can download code.Go
Web user controls design pattern and data binding part 1 ... A lot of people are using user controls in asp because they are very easy to use, have design time support and so on. The purpose of this article is to prevent making mistakes when design a web control and to present a pattern that works for me perfectlyGo
Things I Hate About .NET ... What are some of the most annoying things about programming in .NET? See what I think and how to overcome them.Go
Filter search and feeds by your interests ... I've been pretty preoccupied with thoughts about the semantic web and how to utilize the possibilities of it recently. My problems with the various protocols, XML formats and microformats have been the lack of consuming services. In other words; it has been relatively painless to construct websites in a semantic way using microformats etc. but no cool services or applications have utilized it. In that regard it has felt much like just an idea with no real purpose. So I have been challenging my self to come up with ideas to utilize the semantic web - a way to consume some of this data in a way that makes sense. One of the formats I have been paying attention to is APML (Attention Profiling Markup Language).Go
ASP.Net AJAX Tooltip Extender ... One component I would love to see would be a TooltipExtender - allowing for both static and dynamic text, allows animations and can be customized where it is required. In an attempt to match this kind of functionality I made a TooltipExtender. The only functionality lacking is animation.Go
Customise Password Recovery Email ... Implement your own Password Recovery Email rather than rely on the simple mail defination of the PasswordRecovery control. Using this method you can replace the password recovery mail with more sophisticated emails using alternate views and linked resourcesGo
Asp.net Digitally Signing Emails ... Download code As this is my first time using C#, I thought that migrating something to C# would be the best for me to learn. Well, I happen to pick something that although portions are on the Internet, the full monte was not unless you want to pay money for it (and the code): grr. So puttin..Go
ASP.NET Control Check/uncheck CheckBox in a GridView ... Download code Check/uncheck CheckBox control inside a GridView using javascript without postback. This article will give an idea on how to achieve this task. Some sample code is provided under Using the code heading and complete code is available in the project download. Background ...Go
How to send HTML Email from ASP.NET using your Gmail account? ... Yes it's possible so why not use it? This little tutorial shows you how to set up your web application to send emails using your Gmail account. Just don't abuse it, ok? :)Go
GridView jQuery Plugin Row MouseOver And Click Styles ... GridView jQuery Plugin Row MouseOver And Click Styles. A Sample plugin using JQueryGo
One Bookmarking Service to Rule Them All and in The Widget Bind Them ... A .NET control that makes it easy to add the AddThis button to web forms. The service still lacks one important site: DNK.Go
Trick: Making Non Themeable Properties of ASP.NET Controls Themeable ... Excellent hack to make Non Themeable properties of ASP.NET controls Themeable. After learning this hack, you would be able to set the Display and the ValidationExpression properties of the RegularExpressionValidator control directly from a Skin file !!! Even the MaxLength property of a TextBox. Would it not be cool to validate all email addresses across your website through a single Skin file ???Go
MVC Framework - Fredrik Normén ... Excellent MVC blogger who discusses a topics from a wide range of complexity. This link contains all of his MVC Framework posts.Go
ASP.Net 2.0 C# DateTime IFormatProvider Using ParseExact ... methods to convert the DateTime format using IFormatProviderGo
Delicious tagged ASP.NET Links
C# and VB .NET Libraries to Digg, Flickr, Facebook, YouTube, Twitter, Live Services, Google and other Web 2.0 APIsGo
Using jQuery to Consume ASP.NET JSON Web Services | EncosiaGo
ASP.NET MVC Action Filter - Caching and Compression - Kazi Manzur Rashid's BlogGo
CodeProject: ASP.NET Internals: Viewstate and Page Life Cycle. Free source code and programming helpGo
Scott on Writing - Security tutorialsGo
SingingEels : Real-Time Progress Bar With ASP.NET AJAXGo
ASP.NET - HomeGo
ASP.NET 3.5 Extensions Preview : The Official Microsoft ASP.NET SiteGo
iridescence.no: Defining Routes using Regular Expressions in ASP.NET MVCGo
ASP.NET MVC: Building Web Apps without Web FormsGo
ASP.NET Debugging : Hangs and how to solve them - part 2 - QueuingGo
GridViewGuyGo
Using Custom BasePage Class in ASP.NetGo
Scott Gu Blog Links
March 28th Links: ASP.NET, ASP.NET AJAX, ASP.NET MVC, Visual Studio, Silverlight, .NET ... Here is the latest in my link-listing series .  Also check out my ASP.NET Tips, Tricks and Tutorials page for links to popular articles I've done myself in the past. ASP.NET Three New ASP.NET Security Tutorials Now Available : Scott Mitchell continues his great ASP.NET security tutorials . These three new ones cover creating and managing roles, assigning roles to users, and implementing role based authorization.  You can also find more security articles by reading posts on my blog tagged with security . .NET Libraries to Digg, Flickr, Facebook, YouTube, Twitter, and other Web 2.0 APIs : Scott Hanselman's latest "weekly source code" review looks at .NET APIs that you can use to call popular web 2.0 services. Hangs and how to Solve Them (Part 1) and (Part 2) : Tom has some useful posts that talk about deadlocks and request queuing in ASP.NET, and how to detect and debug what might be causing them. ASP.NET AJAX Building ASP.NET AJAX Controls (Part 1) , (Part 2) , and (Part 3) : Mike Ormond has started a nice blog post series that talks about how to build ASP.NET AJAX Controls.  Make sure to check out Part 2 - Components and Part 3 - Properties and Events as well. New ASP.NET AJAX "How Do I?" Videos : Joe Stagner has published a number of new ASP.NET AJAX "How Do I?" videos.  Learn about the re-order control , retrieving values from server-side AJAX controls , two techniques for triggering updates to update panels , and using the cascading drop down control . Real-Time Progress Bar with ASP.NET AJAX: SingingEels shows a technique for displaying real-time progress notifications using AJAX as a long-lived activity runs on the server. Using JQuery to Consume ASP.NET AJAX JSON Web Services : Dave Ward has a nice post that describes how to use the JQuery AJAX library on the client to call an ASP.NET Web Service on the server that is JSON enabled (using ASP.NET AJAX on the server).  ASP.NET MVC Kigg - Building a Digg Clone with ASP.NET MVC : Kazi Manzur Rashid published an excellent Digg-clone sample built with ASP.NET MVC last February.  He recently updated the code to work with ASP.NET MVC Preview 2 (full details here ).  You can download the latest version of his source code here . ASP.NET MVC In-Depth: The Life of an ASP.NET Request : Stephen Walther has a great post that details the exact steps that occur when an ASP.NET MVC request executes.  ASP.NET MVC Action Filters - Caching and Compression : Kazi Manzur Rashid has another great post that shows how to use the new ActionFilterAttribute support in ASP.NET MVC to implement output caching and compression attributes. Read this quickstart article to learn more about how Action Filters work, or watch Scott Hanselman's video that covers them. Defining Routes using Regular Expressions with ASP.NET MVC : Someone asked me the other day how to use regular expressions to define route rules with ASP.NET MVC.  Turns out Fredrik Kalseth already has a nice sample that shows how to-do this. Testing with the ASP.NET MVC Framework : Simone Chiaretta has a great article that discusses how to test controllers using ASP.NET MVC Preview 2.  Note: the next ASP.NET MVC preview release will include a number of refactorings that will simplify controller testing considerably (and avoid the need to mock anything for common scenarios). Test-Driven Development with Visual Studio 2008 Unit Tests : Stephen Walther has a really nice post that describe how the unit testing features now built-in VS 2008 Professional work (using an ASP.NET MVC project).  Also check out Stephen's excellent Introduction to Rhino Mocks blog post that describes how to use the open source Rhino Mocks framework with VS unit test projects. Visual Studio VS 2008 Web Deployment Hot-Fix Roll-Up Now Available for non-English Languages: Last month we shipped a hot-fix release that fixes a number of bugs, adds a few features, and improves performance for web development scenarios in VS 200Go
New Log Reporting, Database Management, and other cool admin modules for IIS 7 ... One of the core priorities we focused on when building IIS 7 was to enable a rich .NET extensibility model that provides developers with the hooks to easily plug-in and extend the web server.  These extensibility hooks are provided in the web-server pipeline (enabling scenarios like the new IIS7 Bit Rate Throttler ), within the configuration system (enabling developers to create new web.config schema settings), within the health monitoring system (enabling developers to add custom trace events), and within the admin tool (enabling developers to plug-in new admin UI modules). We added these extensibility hooks so that anyone can easily extend and enhance the web server using .NET.  We also selfishly wanted them so that we can ship regular feature packs that add additional features to the core web server. IIS 7 Admin Pack Preview 1 Released Last week the IIS team shipped the first technical preview of some really cool administration modules that I think web developers will find super useful.  This preview adds several new features to the IIS7 Admin Tool: Database Manager : Built-in SQL Server database management, including the ability to create, delete, and edit tables and indexes, create/edit SPROCs and execute custom queries.  Because it is integrated in the IIS administration tool it all works over HTTP/SSL - which means you can use the module to remotely manage your hosted applications (even with low-cost shared hosting accounts), without having to expose your database directly on the Internet. Log Reports : Built-in report visualization with charting support for log files data.  Full range selection and custom chart creation is supported, as well as the ability to print or save reports.  Like the database manager you can use this module remotely over HTTP/SSL - which means it works in remote shared hosting scenarios. Configuration Editor: This is a power module that provides complete control over editing all web.config settings within the admin tool.  You can configure it to track the changes you make using the UI and have it auto-generate configuration change scripts that you can then save and tweak to re-run later in an automated way. Request Filtering UI: This admin module provides more control over the new request filtering feature in IIS7.  Check out Carlos' blog post here for details on how to use it. .NET Authorization: This admin module provides a custom authorization rules editor which allows you to more easily manage the ASP.NET <authorization> configuration section. FastCGI UI: This admin module provides more support for editing all the new <fastCGI> settings (for when you use FastCGI modules with IIS7 like PHP). Below are some screen-shots and simple walkthroughs of the Log Reporting and Database Manager administration UI modules: Log Reporting Admin Module Have you ever deployed a web application onto a server and wondered how much load it is getting?, what the average response time from the server is?, or whether many server errors are occurring (and if so on what URLs)?  All of these settings are carefully logged by IIS in a text based log file.  Today most people use command-line tools like the IIS Log Parser utility to query and analyze these files. The IIS 7 Admin Pack and the new "IIS Reports" admin module now enable you to also query and chart your reports graphically within the IIS admin tool: Out of the box the "IIS Reports" admin module comes with a bunch of pre-built logparser-based reports that you can easily run on your sites and applications: Below is a simple graphical report we could pull up that looks at the HTTP status codes being returned by my "TestSite" application (note how we are using the "bar graph" visualization option): Reports can optionally be filtered using a date range.  You can also push the print or save buttons within the report page to generate a printer or a local saved version of the report. The IIS7 Admin ToGo
ASP.NET MVC Source Code Now Available ... Last month I blogged about our ASP.NET MVC Roadmap . Two weeks ago we shipped the ASP.NET Preview 2 Release . Phil Haack from the ASP.NET team published a good blog post about the release here . Scott Hanselman has created a bunch of great ASP.NET MVC tutorial videos that you can watch to learn more about it here . One of the things I mentioned in my MVC roadmap post was that we would be publishing the source code for the ASP.NET MVC Framework, and enable it to be easily built, debugged, and patched (so that you can work around any bugs you encounter without having to wait for the next preview refresh release). Today we opened up a new ASP.NET CodePlex project that we'll be using to share buildable source for multiple upcoming ASP.NET releases. You can now directly download buildable source and project files for the ASP.NET MVC Preview 2 release here . Building the ASP.NET MVC Framework You can download a .zip file containing the source code for the ASP.NET MVC Framework for the release page here . When you extract the .zip file you can drill into its "MVC" sub-folder to find a VS 2008 solution file for the project: Double-clicking it will open the MVC project containing the MVC source within VS 2008: When you do a build it will compile the project and output a System.Web.Mvc.dll assembly under a \bin directory at the top of the .zip directory. You can then copy this assembly into a project or application and use it. Note: the license doesn't enable you to redistribute your custom binary version of ASP.NET MVC (we want to avoid having multiple incompatible ASP.NET MVC versions floating around and colliding with each other). But it does enable you to make fixes to the code, rebuild it, and avoid getting blocked by an interim bug you can't work around. Next Steps Our plans are to release regular drops of the source code going forward. We'll release source updates every time we do official preview drops. We will also release interim source refreshes in between the preview drops if you want to be able to track and build the source more frequently. We are also hoping to ship our unit test suite for ASP.NET MVC in the future as well (right now we use an internal mocking framework within our tests, and we are still doing some work to refactor this dependency before shipping them as well). Hope this helps, ScottGo
IIS 7.0 Bit Rate Throttling Module Released ... Video on the web is now one of those common scenarios that every user takes for granted, and increasingly every major site is incorporating in some form (product videos, training videos, richer advertising scenarios, user generated content, customer testimonials, etc). One of the challenges when adding video to a site, though, is delivering it in a way that doesn't cost a fortune. Network bandwidth costs a lot of money, and the cost of high quality video usage can quickly add up. The blog post below provides a quick overview of some of the options you can use to reduce the cost of delivering video, and discusses a new free download - the IIS 7.0 Bit Rate Throttling Module - that was released a few days ago and which enables you to easily save money when serving video from an IIS web server using any video technology (including Silverlight, Windows Media Player and even Flash). Option 1: Using a Video Hosting Service One approach you can take to reduce video bandwidth costs is to use a video hosting service like YouTube or the free Microsoft Silverlight Streaming Service . This allows you to use someone else's network to deliver the video content, and avoid having to pay the bandwidth costs yourself. If you aren't familiar with the Silverlight Streaming service, it allows you to upload up to 10GB of videos and download 5 Terabytes/month of video content (at up to a 1.4 Mbps bit-rate) for free. You can build any custom Silverlight client player application you want to embed the video within it. This means it doesn't require a specific video player look and feel, nor a service logo/watermark to play the video. This allows you to fully integrate the video into your site and use whatever UI you want to host it. Option 2: Hosting Video on Your Own Servers Sometimes using a video hosting service doesn't make sense (for example: you want to use custom authentication to grant/deny user's access, you want to play really long video segments, or you want to serve up custom ads in your videos). Instead you might want to serve the video up from your own servers and have complete control over it. There are typically two options you can use to deliver the video from your servers: using a streaming approach or a progressive video download approach: Streaming Server Scenario In a streaming scenario a client (like Silverlight, Windows Media Player, Flash or Real Networks) connects to a streaming server. The streaming server then sends down the video stream to watch, and typically enables a user to dynamically skip ahead/behind, pause or stop the video stream. When the user closes the browser or navigates away from the page the video stream automatically stops transmitting. Windows Media Services (WMS) is a free streaming server download available for Windows, and can stream video to both Windows Media Player and cross-platform Silverlight browser clients. It is generally regarded as the most server scalable and cost effective way to enable video streaming on the web, and handles both on-demand file streaming scenarios (for example: streaming a .wmv file) as well as live stream scenarios (for example: a sporting event like the Olympics that is happening live in real time). Windows Media Services can be used on any version of Windows Server - including the new Windows Server 2008 Web Server edition (which only costs $469, enables up to 4 processors and 32GB of RAM, and supports IIS, ASP.NET, SharePoint, and Windows Media Services). Progressive Download Scenario In a progressive download scenario a client (like Flash or Silverlight) downloads a video directly off of a web-server, and begins playing it once enough video is downloaded for it to play smoothly. The benefit of using a progressive download approach is that it is super easy to setup on a web-server. Just copy/ftp a video up to a web-server, obtain a URL to it, and you can wire it up to a video client player. It doesn't require any custom web-server configuratGo
March 14th Links: ASP.NET, ASP.NET AJAX, ASP.NET MVC and .NET ... I'm slowly recovering from keynoting at MIX last week, and have been digging my way out of backlogged email the last few days.  I'm going to try and finish catching up on blog comments this weekend - apologies for the delay in getting back to some of your questions. To kick-start my blogging again I thought I'd post a new link-listing series .  Today's post is mostly focused on ASP.NET and web related links.  I'm going to be doing more Silverlight and WPF posts soon. ASP.NET Tag Cloud Filters with ASP.NET 3.5's LinqDataSource and ListView Controls : Matt Berseth has a cool post that shows off using LINQ to SQL and ASP.NET 3.5 to build a tag-cloud navigation UI. Five New ASP.NET Security Tutorials Now Available : Scott Mitchell continues his great ASP.NET security tutorials .  These 5 new ones (all in both VB and C#) cover using the ASP.NET membership system. Building a Vista Style Folder Browser with ASP.NET 3.5 and a Custom Hierarchical DataSource Control: Matt Berseth continues his great posts with a nice one that shows how to build a custom HierarchicalDataSourceControl to implement file browsing functionality using ASP.NET. ASP.NET AJAX New ASP.NET AJAX Control Toolkit Release: David Anson blogs about a new ASP.NET AJAX Control Toolkit release that the team made right before MIX.  This release includes a number of patches (including a bunch from the community) with bug fixes and improvements in a bunch of areas. LinkedIn Style Theme for the ASP.NET AJAX Tab Container Control: Matt Berseth posts some cool new themes you can use with the ASP.NET AJAX Control Toolkit's tab control. ASP.NET AJAX In-Depth: Object Inheritance : Stephen Walther, author of the recently published ASP.NET 3.5 Unleashed book , posts an incredibly in-depth article about how object inheritance is handled with ASP.NET AJAX. ASP.NET AJAX In-Depth: Creating JavaScript Properties: Stephen Walther continues his series with an in-depth article discussing how JavaScript Properties are handled with ASP.NET AJAX. ASP.NET AJAX In-Depth: Application Events : Yes another Stephen Walther article discussing how application events are handled with ASP.NET AJAX. ASP.NET AJAX Localization Slides and Code: Joel Rumerman has a nice post with samples + slides about how the localization features in ASP.NET AJAX work. JScript Intellisense: working with Ext JS : The VS web tools team enabled JQuery intellisense last month with the VS 2008 Web Development hot fix .  In this more recent post they talk about enabling intellisense support for Ext JS (another popular JavaScript framework).  VS 2008 Intellisense support for Prototype is coming in the next few weeks. JavaScript Intellisense for the Virtual Earth Map Control: Marc Schweigert is driving a project to add great VS 2008 JavaScript intellisense support for the Virtual Earth Map Control.  Check out his video and visit his codeplex project to learn more. ASP.NET MVC ASP.NET MVC Preview 2: Last week at MIX the ASP.NET team shipped a second preview release of the ASP.NET MVC framework.  This release has a number of improvements in it (see my earlier MVC roadmap post that covers some of them).  Watch the Scott Hanselman videos on the http://www.asp.net/mvc page, as well as the quickstart samples to learn more. Thoughts on ASP.NET MVC Preview 2 and Beyond : Phil Haack from the ASP.NET team has a great post where he talks about the ASP.NET MVC Preview 2 release, as well as some of the features and work that will show up in the next preview drop.  One of the major focuses in Preview 3 will be improvements to the testing workflow of controllers. Cheesy Northwind Sample Code: Scott Hanselman has posted a sample application that shows building a simple data driven application using the ASP.NET MVC Framework and the Northwind sample database. Securing Your Controller Actions : Rob Conery shows how to use the new ASP.NET MVC ActionFilterAttribute feature to apply declarative secuGo
My Presentations in Arizona this Tuesday ... Update: You can now download the slides + demos I used during my talks. Click here for the Silverlight Talk . Click here for the MVC Talk . This week I'm visiting Scottsdale Arizona and will be presenting at a free user group event during the day. I'm presenting two sessions myself: 1) Developing Applications using Silverlight 2 : This will be a drill-down into the new Silverlight 2 Beta1 release, and how you can build applications with it using VS 2008 and Expression Blend. You'll leave this session with a good understanding of the basics of Silverlight programming and how to start building applications with it. 2) Developing Applications using ASP.NET MVC : This session will be a drill-down into the new ASP.NET Model-View-Controller framework option (which last week was updated . You'll leave this session with a good understanding of what it is, how it works, and how to start building ASP.NET web applications with it. In addition to my sessions above, there will also be great sessions at the event from Microsoft employees on "Consuming Web Services with Microsoft Silverlight", "Encoding Video for Microsoft Silverlight", and "Serving Applications with Microsoft Silverlight Streaming". You can sign up and attend the sessions for free. Click here for more details on the events, and click here to register online to attend. Hope to see some of you there, ScottGo
First Look at Using Expression Blend with Silverlight 2 ... Last week I did a First Look at Silverlight 2 post that talked about the upcoming Silverlight 2 Beta1 release.  In the post I linked to some end-to-end tutorials I've written that walk through some of the fundamental programming concepts behind Silverlight and WPF, and demonstrate how to use them to build a "Digg Search Client" application using Silverlight: Part 1: Creating "Hello World" with Silverlight 2 and VS 2008 Part 2: Using Layout Management Part 3: Using Networking to Retrieve Data and Populate a DataGrid Part 4: Using Style Elements to Better Encapsulate Look and Feel Part 5: Using the ListBox and DataBinding to Display List Data Part 6: Using User Controls to Implement Master/Details Scenarios Part 7: Using Templates to Customize Control Look and Feel Part 8: Creating a Digg Desktop Version of our Application using WPF In this first set of Silverlight tutorials I didn't use a visual design tool to build the UI, and instead focused on showing the underlying XAML UI markup (which I think helps to explain the core programming concepts better).  Now that we've finished covering the basics - let's explore some of the tools we can use to be even more productive. Expression Blend Support for Silverlight In addition to releasing the upcoming Beta1 of Silverlight 2, we are also going to ship Visual Studio 2008 and Expression Studio tool support for targeting it.  These tools will offer a ton of power for building RIA solutions, and are designed to enable developers and designers to easily work on projects together. In today's post I'm going to introduce some of the features in the upcoming Expression Blend 2.5 March preview.  After demonstrating some of the basics of how Blend works, we are going to use it to build a cross-platform, cross-browser Silverlight IM chat client: The above screen-shot shows what the application looks like at runtime on a Mac.  Below is a screen-shot of what it looks like at design-time within Expression Blend: We'll use Expression Blend to graphically construct all of the UI for the application, as well as use it to cleanly data-bind the UI to .NET classes that represent our chat session and chat messages. All of the controls we'll use to build the chat application are built into Beta1 of Silverlight 2. Disclaimer: I am not a designer (nor am I cool) Let me say up front that I am a developer and not a designer.  I'm also not very cool.  While I understand the techniques to create UI, I sometimes choose bad colors and fonts when putting it together (only after I did all the screen-shots for this post did a co-worker helpfully point out that there is actually a site dedicated to banning some of the fonts and colors I used . Ouch). For those of you with artistic skill out there - please be gentle with me and focus your attention on the features and techniques I demonstrate below, rather than on the font and color choices I use. :-) Getting Started: Creating a new Silverlight 2 Project Expression Blend and Visual Studio 2008 share the same solution/project file format, which means that you can create a new Silverlight project in VS 2008 and then open it in Expression Blend, or you can create a new Silverlight project in Expression Blend and open it in VS.  You can also have both Expression Blend and VS 2008 open and editing the same project as the same time. Since in my previous Silverlight tutorial series I already showed how to create a new Silverlight project using VS 2008, let's use this post to show how to create a new Silverlight application using Expression Blend.  To do this, simply choose File->New Project in Expression Blend, select the "Silverlight 2 Application" icon, and click ok: This will create a new (VS-compatible) solution file and Silverlight application project: Blend includes a full WYSIWYG designer for Silverlight 2 applications.  When opening Silverlight pages and controls you can switch the design-surface to be in design vieGo
First Look at Silverlight 2 ... Last September we shipped Silverlight 1.0 for Mac and Windows , and announced our plans to deliver Silverlight on Linux. Silverlight 1.0 focused on enabling rich media scenarios in a browser, and supports a JavaScript/AJAX programming model. We are shortly going to release the first public beta of Silverlight 2, which will be a major update of Silverlight that focuses on enabling Rich Internet Application (RIA) development. This is the first of several blog posts I'll be doing over the weeks and months ahead that talk in more depth about it. Cross Platform / Cross Browser .NET Development Silverlight 2 includes a cross-platform, cross-browser version of the .NET Framework, and enables a rich .NET development platform that runs in the browser. Developers can write Silverlight applications using any .NET language (including VB, C#, JavaScript, IronPython and IronRuby). We will ship Visual Studio 2008 and Expression Studio tool support that enables great developer / designer workflow and integration when building Silverlight applications. This upcoming Beta1 release of Silverlight 2 provides a rich set of features for RIA application development. These include: WPF UI Framework : Silverlight 2 includes a rich WPF-based UI framework that makes building rich Web applications much easier. In includes a powerful graphics and animation engine, as well as rich support for higher-level UI capabilities like controls, layout management, data-binding, styles, and template skinning. The WPF UI Framework in Silverlight is a compatible subset of the WPF UI Framework features in the full .NET Framework, and enables developers to re-use skills, controls, code and content to build both rich cross browser web applications, as well as rich desktop Windows applications. Rich Controls : Silverlight 2 includes a rich set of built-in controls that developers and designers can use to quickly build applications. This upcoming Beta1 release includes core form controls (TextBox, CheckBox, RadioButton, etc), built-in layout management panels (StackPanel, Grid, Panel, etc), common functionality controls (Slider, ScrollViewer, Calendar, DatePicker, etc), and data manipulation controls (DataGrid, ListBox, etc). The built-in controls support a rich control templating model, which enables developers and designers to collaborate together to build highly polished solutions. Rich Networking Support : Silverlight 2 includes rich networking support. It includes out of the box support for calling REST, WS*/SOAP, POX, RSS, and standard HTTP services. It supports cross domain network access (enabling Silverlight clients to directly access resources and data from resources on the web). Beta1 also includes built-in sockets networking support. Rich Base Class Library : Silverlight 2 includes a rich .NET base class library of functionality (collections, IO, generics, threading, globalization, XML, local storage, etc). It includes rich APIs that enable HTML DOM/JavaScript integration with .NET code. It also includes LINQ and LINQ to XML library support (enabling easy transformation and querying of data), as well as local data caching and storage support. The .NET APIs in Silverlight are a compatible subset of the full .NET Framework. Silverlight 2 does not require the .NET Framework to be installed on a computer in order to run. The Silverlight setup download includes everything necessary to enable all the above features (and more we'll be talking about shortly) on a vanilla Mac OSX or Windows machine. The Beta1 release of Silverlight 2 is 4.3MB in size, and takes 4-10 seconds to install on a machine that doesn't already have it. Once Silverlight 2 is installed you can browse the Web and automatically run rich Silverlight applications within your browser of choice (IE, FireFox, Safari, etc). Silverlight 2 Tutorials: Building A Simple Digg Client To help people come up to speed with Silverlight 2, I wrote a Silverlight application and put toGo
.NET 3.5 Client Product Roadmap ... A few months ago I did a .NET Web Product Roadmap blog post where I outlined some of the product plans we have to build on top of the web development features we’ve shipped with Visual Studio 2008 and .NET 3.5. Over the next few months we will also be releasing a number of enhancements specific to client development as well.  We have put a lot of effort into addressing some of the biggest areas of customer feedback, while also trying to really push the envelope on the capabilities developers have when building Windows applications. All of these improvements build on top of VS 2008 and .NET 3.5, and will make .NET client development even better going forward. Below is a roadmap of some of the upcoming releases we have planned for the months ahead: Improved .NET Framework Setup for Client Applications One of the biggest asks we’ve had over the years from customers and ISVs building client applications is to make the setup and installation of the .NET Framework easier and faster. This summer we are going to ship a new setup framework for .NET that makes it easier to build optimized setup packages for client applications. This setup framework can be integrated with existing installation frameworks (for example: products like InstallShield), and enables a smaller and faster end-user setup experience of the .NET Framework. Windows Forms and WPF client applications will be able to use this setup framework to cleanly “bootstrap” getting the .NET Framework installed onto machines. The setup “bootstrap” utility will support automatically downloading the minimal set of .NET Framework packages needed to enable .NET 3.5 client applications on a machine. For example, if a user already has .NET 2.0 installed on their machine, setup will be smart enough to automatically download only the upgrade patches necessary to update .NET 2.0 to 3.5 (and not have to re-download the components already provided by .NET 2.0). This will significantly shrink the payload size of client setup programs, and speed up the installation experience. We’ll also be delivering improvements that enable a more integrated application install experience for both MSI and ClickOnce based solutions, and support a more consumer friendly user experience that is easy to build. Improved Working Set and Startup Improvements for .NET Client Applications One of the other common asks we receive is to enable .NET client applications to launch faster in “cold startup” scenarios. “Cold startup” scenarios occur when no other .NET client applications are running (or have recently run) on a machine, and require the OS to load lots of pages (code, static data, registry, etc) from disk. If you are loading a large .NET client application or library, or are using a slow disk, these cold startup scenarios can require many seconds for your application to start. This summer we are going to ship a servicing update to the CLR that makes some significant internal optimizations in how we optimize our data structures to cut down on disk IO and improve memory layout when loading and running applications. Among many other benefits, this work will significantly improve the working set and cold startup performance of .NET 2.0, 3.0 and 3.5 applications and will dramatically improve end-user experiences with .NET-based client applications. Depending on the size of the application, we expect .NET applications to realize a cold startup performance improvement of between 25-40%. Applications do not need to change any code, nor be recompiled, in order to take advantage of these improvements so the benefits are automatic. WPF Performance Improvements This summer we are also planning to release a servicing update to WPF that includes a bunch of performance optimizations that improve its text, graphics, media and data stack. These include: - Moving the DropShadow and Blur bitmap effects, which are currently software rendered, to be hardware accGo
Feb 17th Links: ASP.NET, ASP.NET AJAX, Visual Studio, .NET ... Here is the latest in my link-listing series .  Also check out my ASP.NET Tips, Tricks and Tutorials page for links to popular articles I've done myself in the past. ASP.NET Top 10 Best Practices for Production ASP.NET Applications : Kyle has a nice post that summarizes a number of good best practices to follow when deploying your ASP.NET applications into production. Paging Through Data with the ASP.NET 3.5 ListView and DataPager Controls : Scott Mitchell continues his excellent series on the new ASP.NET 3.5 data control features.  In this latest article he shows how to page using the ListView and DataPager controls. ASP.NET AJAX How to install and use the ASP.NET AJAX Control Toolkit in VS : Nannette Thacker has a nice post that details step-by-step how to install and use the ASP.NET AJAX Control Toolkit controls within Visual Studio or Visual Web Developer. JavaScript Stack Traces in ASP.NET AJAX and JavaScript Error Publishing using ASP.NET AJAX : Joel Rumerman has put together two nice posts that detail some god ways to capture JavaScript stack trace information, as well as to report JavaScript errors using ASP.NET AJAX. ASP.NET AJAX History Tutorials : Jonathan Carter has published a good series of tutorials that demonstrate how to use the new ASP.NET AJAX History support that we'll be shipping later this year (it is currently available in the ASP.NET Extensions CTP download).  This enables you to add forward/back button navigation support within AJAX applications. Using JQuery with VS 2008 JavaScript Intellisense : One of the improvements we shipped in our recent VS 2008 Hotfix Roll-Up last week was to address issues with JavaScript intellisense support for JQuery (another popular AJAX framework).  Brennan Stehling, James Hart, and Lance Fisher have done blog posts recently that discuss how to enable even richer JQuery intellisense inside VS 2008 using intellisense-friendly JQuery libraries that are referenced while coding (and then swapped out for the real library at runtime).  You can read their blog posts about how this works here and here and here . ASP.NET MVC Tip: Submitting an AJAX Form with JQuery : While on the subject of JQuery, I thought I'd link to a post in Mike Bosch's ASP.NET MVC series that shows how you can integrate JQuery in the browser on the client with the ASP.NET MVC framework on the server. Visual Studio Visual Studio Programmer Themes Gallery: Visual Studio enables you to customize the color settings of the text editor and IDE, as well as to export and import the settings (use the Tools->Import and Export Settings menu to do this).  Scott Hanselman has a great post that provides previews of a bunch of cool pre-built themes that people have published that you can download and use for free. Did you know: the Solution Explorer Supports Type-Ahead Selection : Sara Ford has another nice post in her series on Visual Studio tips and tricks.  This post talks about a shortcut you can use to quickly select files in the solution explorer. Code Profiler Analysis in VS 2008 : Maarten Balliauw has a nice post that describes how to use the code profiling features in the Developer edition of Visual Studio Team System to analyze code performance. Visual Studio Team System 2008 Database Edition Power Tools : Greg Duncan posts about the new power tools download that has been released by Microsoft and which delivers a bunch of cool new database development features for the Database editions of Visual Studio Team System. Japanese Release of VS 2008 Web Deployment Projects : Late last month I announced the release of the VS 2008 Web Deployment Project support.  This past week the team also released a localized Japanese version of it.  Note: you can read a Japanese translated version of my blog here (thanks Chica!). .NET LINQ to JSON , LINQ to SharePoint , LINQ to Active Directory , LINQ to TerraServer , LINQ to FlickR : Just a few of the new LINQ providers now availableGo
ASP.NET MVC Framework Road-Map Update ... This past December we released the first preview of a new ASP.NET MVC Framework as part of the ASP.NET 3.5 Extensions CTP Release . I also wrote a number of blog posts that provide more detail on what the ASP.NET MVC framework is and how you can optionally use it: Introducing the ASP.NET MVC Framework ASP.NET MVC Tutorial (Part 1) ASP.NET MVC Tutorial (Part 2: Url Routing) ASP.NET MVC Tutorial (Part 3: Passing ViewData from Controllers to Views) ASP.NET MVC Tutorial (Part 4: Handling Form Edit and Post Scenarios) We've had great feedback on the framework since then, and had a ton of downloads and excitement around it.  One of the common questions people have asked me recently is "when will a new build be released and what will be in it?". The below post provides a few updates on what the ASP.NET MVC feature team has been working on, and some of the new features that will be available soon.  I'm going to do a separate blog post in the future that will cover the new ASP.NET Dynamic Data and ASP.NET AJAX feature work that is progressing along nicely as well.  All of these features (ASP.NET MVC, ASP.NET Dynamic Data, and the new ASP.NET AJAX improvements) will ship later this year and work with VS 2008 and .NET 3.5. Upcoming ASP.NET MVC MIX Preview Release We are planning to release the next public preview of ASP.NET MVC at the MIX 08 conference in a few weeks.  This build will be available for anyone on the web to download (you do not need to attend MIX to get it).  We have incorporated a lot of early adopter feedback into this release.  Below are some of the improvements that will appear with this next preview release: 1) The ASP.NET MVC Framework can be deployed in the \bin directory of an app and work in partial trust The first ASP.NET MVC preview release required a setup program to be run on machines in order for the System.Web.Mvc.dll assembly to be registered in the machine's GAC (global assembly cache). Starting with this upcoming preview release we will enable applications to instead directly reference the System.Web.Mvc.dll assembly from the application's \bin directory.  This means that no setup programs need to be run on a sever to use the ASP.NET MVC Framework - you can instead just copy your application onto a remote ASP.NET server and have it run (no registration or extra configuration steps required). We are also doing work to enable the ASP.NET MVC framework to run in "partial/medium trust" hosting scenarios.  This will enable you to use it with low-cost shared hosting accounts - without requiring the hosting provider to-do anything to enable it (just FTP your application up and and it will be good to run - they don't need to install anything). 2) Significantly enhanced routing features and infrastructure One of the most powerful features of the ASP.NET MVC framework is its URL routing engine (I covered some of these features here ). This upcoming ASP.NET MVC preview release contains even more URL routing features and enhancements.  You can now use named routes (enabling explicit referencing of route rules), use flexible routing wildcard rules (enabling custom CMS based urls), and derive and declare custom route rules (enabling scenarios like REST resources mappings, etc). We have also factored out the URL routing infrastructure from the rest of the MVC framework with this preview, which enables us to use it for other non-MVC features in ASP.NET (including ASP.NET Dynamic Data and ASP.NET Web Forms). 3) Improved VS 2008 Tool Support The first ASP.NET MVC preview had only minimal VS 2008 support (basically just simple project template support). This upcoming ASP.NET MVC preview release will ship with improved VS 2008 integration.  This includes better project item templates, automatic project default settings, etc.  We are also adding a built-in "Test Framework" wizard that will automatically run when you create a new ASP.NET MVC Project via the File->New PrGo
VS 2008 Web Development Hot-Fix Roll-Up Available ... One of the things we are trying to do with VS 2008 is to more frequently release public patches that roll-up bug-fixes of commonly reported problems.  Today we are shipping a hot-fix roll-up that addresses several issues that we've seen reported with VS 2008 and Visual Web Developer Express 2008 web scenarios. 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. Hope this helps, ScottGo
Feb 6th Links: ASP.NET, ASP.NET AJAX, Visual Studio, .NET, WPF ... Here is the latest in my link-listing series .  Also check out my ASP.NET Tips, Tricks and Tutorials page for links to popular articles I've done myself in the past. ASP.NET ASP.NET Security Tutorial Series : Scott Mitchell (who wrote the excellent Data Access Tutorial Series for us last year), has recently begun a new free tutorial series focused on ASP.NET Security.  Today we published the first three article in the series on the www.asp.net site: ASP.NET Security Basics , Overview of Forms Authentication , and Forms Authentication Configuration and Advanced Topics .  For even more ASP.NET Security Information, please check out the security tutorials I've also done on my ASP.NET Tips, Tricks and Tutorials page . 10 ASP.NET Performance and Scalability Secrets : Omar Al Zabir, the CTO and co-founder of www.pageflakes.com (a Web 2.0 portal site built with ASP.NET), has written another in his excellent series of articles on ASP.NET and ASP.NET AJAX.  This article discusses tips and tricks to maximize ASP.NET performance and scalability.  To learn even more about how to build great sites using ASP.NET and ASP.NET AJAX, make sure to read Omar's excellent new Building a Web 2.0 Portal with ASP.NET 3.5 book. .NET Debugging Demos Lab : Tess Ferrandez, who is an ASP.NET escalation engineer for Microsoft support and who also posts incredible articles on the art of debugging production ASP.NET applications, has started a new tutorial series that provides a sample "buggy" application and a series of questions/problems you can work through to learn how to debug problem applications in production environments. 4 Alternative View Engines for ASP.NET MVC : The open source MvcContrib project has been adding lots of cool goodness on top of the ASP.NET MVC Framework.  Jeffrey Palermo posts about 4 alternative view rendering engines now in the project that you can use if you don't want to use the default .aspx based view engine.  BTW - I'll be doing a new post on ASP.NET MVC within the next week talking about some of the cool new features coming soon with the next refresh.  ASP.NET AJAX Boost ASP.NET Performance with Deferred Content Loading : Dave Ward continues his great articles on ASP.NET AJAX.  This article talks about how you can improve the perceived load-time of a page by using an AJAX callback to retrieve HTML content once the page loads on the client.  This approach is similar to the one I wrote about in my tip/trick post here . Build Yahoo UI Style Glowing Buttons with the ASP.NET AJAX Control Toolkit GlowButtonExtender Control: Matt Berseth continues his excellent series on using ASP.NET AJAX.  In this post he discusses how to create cool glowing button effects. Visual Studio Resolving Namespaces and Removing Unused Using Statements : David Hayden has a nice article that discusses a few Visual Studio code editing features that developers often overlook.  Visual Studio 2008 Product Comparison : Several people have sent me email in the past asking for a page that describes the differences between the various Visual Studio 2008 editions (Standard, Professional, Visual Studio Team System, etc).  This link is useful to bookmark if you want to learn more about this. Did you know...You can Shift+ESC to close a tool window: Sara Ford continues her excellent "Did you know..." VS 2008 tips and tricks series.  I confess I didn't know this one.  One productivity tip I always recommend is to really learn the keyboard shortcuts of your development tool environment well - since using them over time can yield significant productivity savings.  Click here to download a VB 2008 key bindings poster, or click here to download the C# 2008 key bindings poster equivalent.  Print them out and put them under your pillow to absorb them while you sleep. .NET The Power of Yield : Joshua Flanagan has a nice article on one of the coolest, yet underused, feature of C# in .NET 2.0 Go
MIX08 ... MIX is a Microsoft web development conference we hold in Las Vegas each year.  MIX tends to be a pretty fun event, both because it covers cutting edge content (we used MIX07 to announce our Silverlight plans), and also because it tends to attract a really diverse set of attendees (including both those who use Microsoft technology today, and a large % of attendees who don't).  The conference structure includes a healthy blend of sessions and interactive panels, and the layout and organization is designed to facilitate great conversations. This year's MIX is being held March 5th-7th in Las Vegas.  Ray Ozzie and I are both giving keynotes the first day of the event, and Steve Ballmer and Guy Kawasaki will be doing a keynote the second day of the event. The conference (and especially my keynote) is going to cover a lot of new web technology.  Attendees will be able to attend sessions covering: IE 8 IIS 7.0 ASP.NET (including ASP.NET 3.5, ASP.NET AJAX, ASP.NET MVC, and ASP.NET Dynamic Data)  VS 2008 and Expression Studio WPF Silverlight 2 And much more.... Channel 9 recently did an interview with me where I talked about some of these new technologies.  In Part 1 of the interview I talked about IIS7, and in Part 2 of the interview I talked about ASP.NET, WPF and Silverlight 2. Register Soon Or You'll Miss Your Chance MIX is held at a smaller venue then some of our larger events like TechEd and PDC.  This gives the conference a more intimate feel (which is fun).  It also means that it sells out each year, and once it is sold out it is really sold out.  Last year I received about 50 emails from people begging for tickets after it was full, and many people even flew to the event hoping to somehow be let in at the door (only to be unfortunately told they couldn't get in).  Unfortunately because of size constraints (and fire marshal restrictions) once it is sold out there really are no more tickets to be had.  Even my own team members get turned away if they haven't registered in time. This year's registration is filling up faster than any of the previous MIX conferences.  If you want to attend I highly recommend registering really soon to ensure you can go.  You can learn more about the event and register online here . Hope to see some of you there - it is going to be fun.... ScottGo
ASP.net.com Community Links
Accessing data using Language Integrated Query (LINQ) in ASP.NET WebPages – Part 2 ... Part 2, sequel and the last of the article Accessing data using Language Integrated Query(LINQ) in ASP.NET WebPages - Part 1 explains how to create entity classes to represent SQL Server database and tables using Object Relational Designer and display data in a web page using LinqDataSource control.Go
Working with ADO.NET Schema APIs ... In majority of data driven applications developers deal with SQL queries that select, insert, update or delete data from the database. However, at times you need to retrieve schema information from the database. Suppose you are building applications that performs data import and export between two or more databases. As a good solution you would want to retrieve table schema at runtime rather than hard coding it. Luckily, ADO.NET provides a set of classes that allow you to query database schema. In this article I will illustrate how these classes work.Go
Client Application Services: Getting Started ... Client Application Services simplifies the access to ASP.NET Application Services and thus helps in managing the user information, authentication, and authorization at a common place for both Web and Windows-based applications.Go
Building a Simple Blog Engine with ASP.NET MVC and LINQ - Part 3 ... In the third part of this series, Keyvan talks about the data model in his simple blogging engine. He shows some concepts related to the LINQ side of the data model to retrieve data for the blogging engine in controllers and pass them to views with the help of screenshots and source code.Go
Unit Testing ASP.NET Pages Using WatiN ... Unit testing is an integral part of the application design. Unit testing is applied at different levels of the application. In this article we will focus on the User Interface level unit testing. We will use WatiN to test our ASP.NET application.Go
Supporting Complex Types in Property Window ... Whenever you set any property of a control in the property window, the property window needs to save this property value in the .aspx file. This process is known as code serialization. For properties that are of simple types (such as integer and string) this code serialization happens automatically. However, when property data types are user defined complex types then you need to do that work yourself. This is done via what is called as Type Converters. This article is going to examine what type converters are and how to create one for your custom control.Go
Adding Multiple Rows in the GridView Control ... A while back an article was published on www.gridviewguy.com which explained how to add a single row at the bottom of the GridView control. You can read the article using this link. Many readers were interested in the idea of adding multiple rows to the GridView. This article explains how to add multiple rows to the GridView control.Go
Building a Volta Control : A Flickr Widget ... This article illustrates how to create a Volta control around Flickr, the popular image hosting service.Go
Extending the GridView to Include Sort Arrows ... While the GridView supports built-in, bi-directional sorting, it does not provide any visual feedback as to what column the grid is sorted by. This article looks at how to add an up or down arrow image to the header of the column the GridView is sorted by.Go
How to open popup windows in IE/Firefox and return values using ASP.NET and Javascript ... With the forums flooded with questions of opening a popup window, passing values to the popup window and then return values back to the parent page using both Internet Explorer and Firefox, I decided to take a plunge into the subject and experiment with an easy implementation. This article explains how to transfer values between the Parent page and a Pop-up window. The code has been tested against IE7 and Firefox.Go
CodeProject.com ASP Links
VTD-XML: XML Processing for the Future (Part II) ... Reveal XML processing issue #1 and explain why document-centric XML Processing is the futureGo
Jigsaw Puzzle Game using Ajax Drag and Drop (ASP.NET 2.0 AJAX Futures November CTP) ... Jigsaw Puzzle Game using Ajax Drag and Drop (ASP.NET 2.0 AJAX Futures November CTP)Go
JavaScript Virtual Keyboard ... This article presents a Virtual Keyboard - an important addendum to the library of usability tools.Go
Implementing ASP.NET XML providers - Part 1 (Persistance) ... In this series I'll go through the steps of my implementation of ASP.NET XmlProviders.Go
Implementing ASP.NET XML providers - Part 2 (Membership Store) ... In this series I'll go through the steps of my implementation of ASP.NET XmlProviders.Go
Data Grid Row Value ... Get DataGrid Row Value without PostBack or AJAXGo
Load and display page contents asynchronously with full postback support ... An AJAX UpdatePanel with less communication overhead and better performance.Go
Check/uncheck CheckBox in a GridView using Javascript ... Check/uncheck CheckBox control inside a GridView using javascript without postback.Go
XML on a Chip ... Discuss the technical considerations of porting XML processing to custom chipsGo
AxiomaticTokenizer ... Financial security with one-time tokensGo
How to Create TreeView Type GridView ... How to Create TreeView Type GridViewGo
Zeta Resource Editor ... A small utility application to edit string resources inside multiple resource files in parallel.Go
Extending Cuyahoga FullText Indexing (Lucene.NET) ... In this article we will extend classes in Cuyahoga.Core.Search namespace in order to provide more generic full text indexing serviceGo
ASProxy: Surf in the web invisibly using ASP.NET power ... A powerfull web proxy that able you pass through the blocked web pages.Go
DotNetSlackers.com Links
Team Foundation Server and Fiddler don`t play nice together ... We were having a few issues using the TFS when a coworker found this link to explain it. Makes sense, Fiddler is filtering the request from Visual Studio to TFS. I wanted to make sure people using Team Foundation Server and fiddler to debug are warned. Cheers AlPosted from http://weblogs.asp.net/albertpascual... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Tweak web.config To Set Compilation Debug False ... ASP.NET applications should never run with <compilation debug="true"> in production. It can have drastic performance implications (of the negative kind). Obviously, in a perfect world, developers would always remember to verify this setting whenever they upload changes to production, but unfortunately many organizations utilize fallible humans in their deployment process, and this is something that is easily missed. As part of an automated build process, this problem can be eliminated fairly easily. Most sections within web.config can be extracted to separate files (using the configSource="{path}" attribute), and separate files can be pulled in for TEST, STAGE, and PRODUCTION environments. However, the bulk of the <system.web> section will likely need to be the same between all three of these environments, so maintaining separate versions of this configuration element would violate DRY and would be prone to problems. The solution in this case is to keep these settings in the main web.config file, and tweak them as part of the deployment process within the automated build. If you're using Web Deployment Projects , they can help in this case. If you're not, keep reading. The easiest way to accomplish the modification of the web.config file is with an EXE that can be called from MSBuild, NAnt, CCNET, or whatever build automation software you're using. If you're only using one of these, it might make sense to create a custom MSBuild or NAnt task just for this purpose, but having the EXE is a bit more general purpose as it can then be called from any of these, or even from a batch file. I decided to name the EXE TweakConfig, and while it includes some code for checking parameters and such, its main function boils down to this (thanks Dan Wahlin for the original version of this code): private static void ModifyDebugValue(string path, bool debugState) { XmlDocument doc = new XmlDocument(); doc.Load(path); XmlElement compile = doc.DocumentElement.SelectSingleNode("system.web/compilation" ) as XmlElement; if (compile != null ) { compile.SetAttribute("debug" , debugState.ToString().ToLower()); } doc.Save(path); } For example: c:\>tweakconfig.exe web.config debug=false would set the <compilation debug="true|false"> section to false . We built this into a continuous integration solution for a client last week, and it's working great. I've been helping a few different companies with their continuous integration server setup (with CruiseControl.NET), and wrote a white paper a couple of months ago for Microsoft on the topic (with TFS 2008), so this is an area I'm spending a fair bit of time on lately. If you'd like help getting up to speed with automated builds and continuous integration for your company, feel free to contact me . I've made the source project and the EXE available. If you find any bugs or enhance it, please email me and I'll update my files. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it! Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Another ASP.NET Ask the Experts Session Coming May 1st, 2008 ... Come by and ask the ASP.NET experts!... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Prometheus Futures and... new RadFormDecorator :) ... Did you know that we just released our Prometheus Futures build? And what exactly a Futures build means? It is nothing less than a preview build for the 2008 Q1 RadControls suite release coming in April! We keep adding new controls to the Prometheus suite to get it ready for its official premiere. Three long-awaited RadControls Classic controls were ported to the suite -RadToolbar , RadPanelbar , RadTabstrip , thusbringing the total number of Prometheus controls to twenty-two . The Prometheus suite ismore than a suite of controls. It is built on top of MS AJAX, and offers a common client-side framework that allows for small overall client-side footprint, compared to the fully-self containted RadControls Classic .I highlyrecommend checking out the online demos available here: http://www.telerik.com/demos/aspnet/prometheus-futures Here is a forum post that features plenty of information about what's packed in the build: http://www.telerik.com/community/forums/thread/b311D-bcmkaa.aspx I would also like to take the chance to share some information about a brand new control developed by my team,that we just added to the suite - the all-new RadFormDecorator :) The FormDecorator started more like a fun project that we posted in our CodeLibrary section. However, judging by the amount of comments it generated, it turns out people have been waiting for such a thing for quite some time. http://www.telerik.com/community/code-library/submission/b311D-bcaecg.aspx What is the RadFormDecorator control? It will skin your page buttons, checkboxes, radiobuttons, checkbox lists, radiobutton lists without the need for you to write any code or change anything on the page! Just drop the RadFormDecorator - set a property or two in case you need fine-tuning, and off you go! It cannot get more "unobtrusive" than that :)So many people wanted it a part of the Prometheus suite, that we decided to include it there, with all the bells and whistles - revised client code, support for all the Prometheus skins, as well as implementing new features that keep coming. Here are the RadFormDecorator current online demos, in case you want to give them a quick look - http://www.telerik.com/demos/aspnet/prometheus-futures/FormDecorator/Examples/Default/DefaultCS.aspx Here are the main features of the RadFormDecorator (compared to the CodeProject version): 12 skins Hover/Out states for the buttons using pure CSS Caching of images for IE6 for smooth user experience CSS for disabled radiobuttons, checkboxes and buttons Various CSS look & feel improvements Internally, we also have 2 new examples, and the following new features complete: DecorationZoneID - allows decorating parts of the page, not the whole page. Among other things, this allows using multiple RadFormDecorator to skin different sections of the page. Automatically detects partial page updates and re-decorates updated page portions Ability to allso skin the scrollbars (IE only) - for all 12 skins. And, of course, there are more improvements that we have in mind for the control :) Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Introducing ComponentArt Upload ... ComponentArt Web.UI 2008.1 includes one new addition to the library of controls: Upload. ComponentArt Upload is a file upload control with all the high-end AJAX and client-centric functionality one should expect from a Web.UI control. The control comes with a custom server-side HTTP module for optimally processing the file upload, and an HTTP handler which provides upload progress information and otherwise enables communication between the module and the control on the client. On... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Nesting the DropDownList to Gridview in ASP.NET 2.0 to update ... Nesting the DropDownList to Gridview in ASP.NET 2.0 to update a column... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Managing FTP Transfers from an ASP.NET Web Page ... While most of us are no strangers to FTP, performing file transfers from a web page is not that common of a requirement. Come to find out, .NET handles it quite well. The trick is keeping it simple.Visit our new .NET 2.0 section!... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Personal Goal -- Do more ScreenCasts ... Today, I ran across the Developer Express ASP.NET blog, where they have several screen casts about using their grid products with LINQ. I love screen casts. You can really tell a story, and show so much more than you could with just words and pictures. And the best part is, the right screen cast can highlight a feature in just a few minutes. Seeing this makes me a little jealous. We've created so many screen casts and video products for other companies, but like more companies, we've not used our... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
FIX: The headers attribute of a cell is rendered incorrectly when the cell is associated with multiple headers in an ASP.NET 2.0 Web application ... 946660 ... FIX: The headers attribute of a cell is rendered incorrectly when the cell is associated with multiple headers in an ASP.NET 2.0 Web applicationThis RSS feed provided by kbAlerz.com.Visit kbAlertz.com to subscribe. It's 100% free and you'll be able to recieve e-mail or RSS updates for the technologies you pick from the Microsoft Knowledge Base.... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Testing ASP.NET MVC on DotNetSlackers ... My second article on the ASP.NET MVC is now live on DotNetSlackers. This time the article is about how to test ASP.NET MVC web applications: unit testing, how the ASP.NET MVC framework facilitates testing and how to test Controllers, both with mocking and with the Extract and Overide Call method. Check it out here: ASP.NET MVC Framework Part 2: Testing Any comment is welcome. If you missed the first article, with a introduction to the ASP.NET MVC framework you can read it here: ASP.NET MVC Framework... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
ASP.NET MVC: Goodbye SmartBag, Hello ViewDataExtensions ... A while back, I thought up the idea of the SmartBag, which has a very friendly API for working with viewdata objects. With the December CTP, adding objects to ViewData was a bit difficult, but now that the ViewData property is an IDictionary on the Controller base class, getting objects in is very easy. If you like this post, subscribe to my feed at http://feeds.feedburner.com/jeffreypalermo. Consider the following usage [Test]public void ShouldRetrieveSingleObjectByType(){ var bag... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Fixing an ASP.NET 2.0 App after upgrading to 3.5 ... When you first open an ASP.NET 2.0 website in Visual Web Developer / Visual Studio 2008, VS asks you if you want to upgrade the project to 3.5. As some of you who are using Microsoft AJAX and who say YES to upgrade to 3.5 have noticed, when you go to run your newly upgraded application (which worked fine before the upgrade), you get build errors !!! The build error complains that it can't load System.Web.Extensions Version 1.0.61025.0 That's the OLD version of Web.Extensions (AJAX) ... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
A templated PleaseWait Button, introduction to template Control ... The purpose of this article is to present the construction of a templated control, working as a PleaseWait button... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
Porting Tutorials: ASP.NET and Windows.Forms ... These tutorials are quite popular to help developers that have a Windows.Forms or ASP.NET application port it to Unix. They walk you through the process of bringing your software to Linux, MacOS X or Solaris: Porting ASP.NET Applications Porting Windows.Forms Applications It is also useful to look at the general porting guidelines.... Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here .Go
ASP.NET.com Links
Team Foundation Server and Fiddler don't play nice together ... We were having a few issues using the TFS when a coworker found this link to explain it. Makes sense, Fiddler is filtering the request from Visual Studio to TFS. I wanted to make sure people using Team Foundation Server and fiddler to debug are warned. Cheers AlGo
Visual Studio Talk Show #71 is online (French) ... Eric De Carufel: Volta et le futur de la plateforme .NET Nous discutons avec Eric De Carufel de la technologie Volta et de son impact sur la plateforme .NET. Volta est une des technologies développées par Microsoft Research dans le cadre du projet Tesla. Eric De Carufel est conseiller chez CGI à Montreal. Il se spécialise dans le développement d’applications à l’aide de la plate-forme Microsoft .NET. Il possède plus dix années d’expérience en conception d'application d'entreprise dans les domaines du transport, de l’alimentation, de l'assurance et de l’ingénierie. Eric est membre du Groupe d'usagers Visual Studio .NET de Montreal et il est un collaborateur de Universal Thread Magazine . Eric est certifié développeur d’applications Microsoft (Microsoft Certified Application Developper – MCAD). Télécharger l'émission Si vous désirez un accès direct au fichier audio en format MP3 ou Windows Media (WMA), nous vous invitons à télécharger le fichier en utilisant un des boutons ci-dessous. Si vous désirez utiliser le feed RSS pour télécharger l'émission, nous vous invitons à vous abonnez en utilisant le bouton ci-dessous. Si vous désirez utiliser le répertoire iTunes Podcast pour télécharger l'émission, nous vous encourageons à vous abonnez en utilisant le bouton ci-dessous.Go
Putting your website in a maintanance mode based on a weekly schedule ... In this blog i will talk about how to redirect the website vistors to a page that display a " web site under maintenance" , you can implement this functionality in your Global application file ( Global.asax file) , you can use Application_BeginRequest event handler which will be called when your website receives a new request , this example will put your website in a maintenance mode if the current day is staturday and for a one hour (from 10 -11) add the following function to Global.asax file , (if you don't have this file in your website , in visual studio , right click on the website , select add new Item , select global Application Class) Private Sub Application_BeginRequest(ByVal source As Object, ByVal e As EventArgs) Dim application As HttpApplication = CType(source, _ HttpApplication) Dim context As HttpContext = application.Context If Now.DayOfWeek = DayOfWeek.Saturday AndAlso Now.Hour = 10 Then context.RewritePath("~/UnderMaintanace.aspx") End If End Sub adding the above code will redirect your website users to UnderMaintanace.aspx page if the day is Saturday and if the time between 10 -11 . Note that i used RewritePath and not Response.redirect because the second one will make a new request to the website and so we will have infinite loop (until we redirect to an HTML page which will not handled by aspnet runtime and the function will not get executed ) the above solution use the date and time of the week to put the website in a maintenance mode , but you can extend this to more practical scenarios , for example , you can use a settings file for your website, so that the administrator can set some flag and put the website in maintenance mode ! Another thing you may want to do is to use HttpModule instead of using the Global application file , so that you can have a reusable module that can be plugged to any new website you design. Further resources: Using HTTP Modules and Handlers to Create Pluggable ASP.NET Components How To Create an ASP.NET HTTP Module Using Visual C# .NET Regards, Anas GhanemGo
What's on your Visual Studio Start Page? ... Call me Mr. Observant....but I just noticed that for some reason my VS2008 start page is set to some Sql Server Rss that contains REALLY out of date information (see:http://msdn.microsoft.com/sql/rss.xml)....so my question to you is what do you have as your start page RSS feed? On another box I had the DotNetKicks feed...but I always got an error when I clicked on a link in that window so I stopped using it after a bit.Go
REST to collection builder using LINQ to XML ... Few weeks ago, I did a post about how can I handle REST response using LINQ To XML. You can take a look at it here. http://weblogs.asp.net/mehfuzh/archive/2008/01/11/rest-with-linq-to-xml.aspx Now , this is nice that we can parse REST response with LINQ To XML but at the same time it is kind of boring writing the mapping manually every time. In my Linq.Flckr project, I need to build objects from REST in various occasions, so its kind of monotonous as well as error prone writing the XML to Object Mapping manually, even its really easy to do using LINQ to XML. Therefore, I have come up with a tiny class that does the task for me and in return, all I have to do is to declare some attributes on top of my Class and Property. Once, I have added all the property mappings, all is left is to create the RestCollectionBuilder object and call the ToCollecton to get the IEnumreable<T> result from REST response. RestToCollectionBuilder<SomeObject> builder = new RestToCollectionBuilder<SomeObject>(); OR // pass the root element from which attributes //will be passed to the SomeObject class. RestToCollectionBuilder<SomeObject> builder = new RestToCollectionBuilder<SomeObject>(##ROOELEMENT##); // Where T: IDisposable // Build the object. IEnumerable<SomeObject> list = builder.ToCollection(##REQUESTURL##); OR // get the element and do some parse of your own, if needed. XElement element = GetElement(..) IEnumerable<SomeObject> list = builder.ToCollection(element);.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Talking about attributes and elements , let's consider the following REST response from Flickr . < rsp stat ="ok" > < person id ="12037949754@N01" nsid ="12037949754@N01" isadmin ="1" ispro ="1" iconserver ="122" iconfarm ="1" gender ="M" ignored ="0" contact ="0" friend ="0" family ="0" revcontact ="0" revfriend ="0" revfamily ="0" > < username > bees</ username > < realname > Cal! Henderson@</ realname > < mbox_sha1sum > 2971b1c2fd1d4f0e8f99c167cd85d522a614b07b</ mbox_sha1sum > < location > San Francisco, USA</ location > < photosurl > http://www.flickr.com/photos/bees/</ photosurl > < profileurl > http://www.flickr.com/people/bees/</ profileurl > < mobileurl > http://m.flickr.com/photostream.gne?id=287</ mobileurl > </ person > </ rsp > .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Here , we need to tell the Collection builder which element is mapped to which property.Accordingly, I have created some custom attributes that will be used by the builder to create the map. Which are XElementAttribuGo
Adding Meta Tags via Code - C# in ASP.NET ... So here is a question why would you want to add your Meta Tags via code? Kinda silly right? Cause if you were a great developer you probably have a whole list of meta tags you have created for your portfolio of web sites right? Well if you are the developer who has those templates you most likely will stop reading here and think this mikedopp character is kinda wierd or is one of those "because you can" type people. I know I am adding much too much fluff to this whole entry and spending...(read more )Go
Resetting your web application or web site without recycling app pool or IIS. ... If you don't know by now you can reset your web applications and or web sites with a simple change to the web.config. For example you can FTP(if remote or hosted) to your server and edit the web.config by adding a space or removing a space. Basically you want the application your using editing with think something has changed since you touched the document. Save the form after this has happened and IIS will recycle the application / web site. This however can be tedious and just well feel like a...(read more )Go
Window Clippings 2.1 ... Sorry for the lack of updates on my blog lately. But in the famous words of Dean Hachamovitch : “please don’t mistake silence for inaction”. :) As usual, you can get the update via the “Check for Updates” button on the About tab. New users can download the latest version from http://www.windowclippings.com/ . I’ve been hard at work on the upcoming 2.5 release which is turning into quite a feature-packed release. At the same time I know that many users would appreciate an update to address some of the most common usability requests so I decided to release version 2.1 to meet that need. This release is relatively minor with just a handful new features but is notable in that it is the first update to Window Clippings in some time and includes lots of small improvements and bug fixes driven by your feedback. New Features A “Send To” menu has been added to the capture screen’s context menu. This allows you to override the default action sequence and send the captured image to an arbitrary “Send To” action of your choice. This is handy if you frequently want to change where you send your images. A new Selection tab allows you to control the default behavior of the capture and selection process. Other Changes As you start using the new version you might notice a lot of small changes designed to make using Window Clippings easier and more pleasant. Window Clippings now uses Windows Vista fonts throughout (Segoe UI for normal text and Calibri for headings). I’ve also changed the behavior of the notification icon’s Exit command after Daniel Moth convinced me that the original behavior was wrong. Exit now simply exits Window Clippings but doesn’t affect the startup options. There are many other improvements and bug fixes. For example the performance of the capture screen on Windows Vista is also improved considerably. I’ve also made the decision to stop providing a completely free version of Window Clippings going forward. The good news for prospective users is that all of the features are now available to non-registered users so you can try any and all features before you decide to purchase a license. I believe this change will make it easier for new users to evaluate the product and allow me to invest more in the development of Window Clippings. That’s all for now. I hope you enjoy this new version. And as usual I’m looking forward to your feedback on this new version as well as what you’d like to see in the future. With this release out of the way I will be able to start writing about some of the new features in the upcoming 2.5 release. Stay tuned! © 2008 Kenny KerrGo
ASP.Net AJAX TooltipExtender ... This article provides an ASP.Net AJAX TooltipExtender. The code and sample website can be downloaded here ( TooltipWebsite.zip ). Due to the ASP.Net AjaxControlToolkit I have become very fond of small and usable components which improve overall user experience. The ControlToolkit contains - and lacks - several very usable components. One component I would love to see would be a TooltipExtender – allowing for both static and dynamic text, allows animations and can be customized where it is required. In an attempt to match this kind of functionality I made a TooltipExtender. The only functionality lacking is animation. Static 1: < tt:TooltipExtender 2: id ="TooltipExtender1" 3: TargetControlID ="lblStatic" 4: runat ="server" 5: Delay ="1" 6: Direction ="Left" 7: TooltipWidth ="300" 8: > 9: < TooltipTemplate > 10: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 11: Ut ut nunc. Mauris et sem et est semper cursus. Ut rutrum 12: dapibus nisl. Vestibulum sit amet lacus. Aliquam ut pede ut enim 13: pharetra scelerisque. Sed pharetra. Etiam eget elit vel nulla 14: iaculis porttitor. Sed nec quam. Sed semper gravida dolor. Nullam 15: dignissim pede ac nisl. Fusce viverra pharetra quam. 16: < ul > 17: < li >< a href ="http://www.microsoft.com" > Microsoft</ a ></ li > 18: < li >< a href ="http://www.apple.com" > Apple</ a ></ li > 19: </ ul > 20: </ TooltipTemplate > 21: </ tt:TooltipExtender > Dynamic 1: < tt:TooltipExtender 2: Direction ="Bottom" 3: ServiceMethod ="DynamicPopulateMethod" 4: CacheDynamicResults ="false" 5: id ="tt1" 6: Delay ="100" 7: TargetControlID ="lblDynamic" 8: runat ="server" /> Properties TargetControlID : id of target control. Delay : How much ms before the item is shown (handy for webservice calls). Direction : Left, Right, Top or Bottom. TooltipWidth : Width of the tooltip. ServiceMethod : Pagemethod for servicecall (same as other pagemethods – like from the DynamicPopulateExtender). ServicePath : Path to webservice. CustomScript : Method of webservice. CacheDynamicResults : Should results be cached. Cheers, CJ.Go
CPU Scheduling Simulator 0.8 Beta 2 Released! ... Download CPUSS 0.8 Beta 2 Beta 2 is not really very revolutionary, however it does add some tooling support to CPUSS: CPUSS Report Generator (cpussrg.exe) CPUSSRG This is a little tool that allows you to invoke a strategy against some specified processes, and then view a HTML report of the simulation. The report exposes a very small amount of data recorded by CPUSS and in RC I may add more, but at the moment for a high level view it is ok. CPUSSRG uses a plugin model. If you want to use CPUSSRG then it is relatively simple, all you need to do is put your algorithms in an assembly (.dll) and make sure you implement IStrategy. Place your algorithm assembly into the Plugin folder of the CPUSSRG tool and you are good to go. I will post later on how to use it more extensively. Download CPUSS 0.8 Beta 2Go










have suggestions for the site?
snappy@alligatortags.com