Alliagator Tags Archive for Tuesday, March 18 2008



DotNetKicks.com Links
Email Something Huge: Introducing the Big Mailer Utility ... I often have to send large files around by email. For example, I had to email a colleague a 10 MB file. It seems a little rude to hit him out of the blue with a 10 MB email. I wanted something cleaner and less intrusive. So I created a simple utility I called "Big Mailer". I figured I'd blog about it and share it with the world. Feel free to use it as you see fit. This program consists of both a client and server piece that simplifies uploading content to your web site. Then the program gives you a regular web link you can send via email.Go
How To: Prevent running ASP / ASP.NET code in specific folder ... ! A nice tip.Go
Create windows service and control ... This article presents the guide to write windows service program and control it from other program.Go
Captcha validation in asp net 2.0 website ... Here is a nice way of reducing the spamming attempts on your website. The implementation of a captcha control in asp .net 2.0 can be very useful.Go
K. Scott Allen : The Passion and the Fury of URL Rewriting ... During the Page_Load event, it's important to use RewritePath again to point to the original URL if your form will POST back to the server...Go
IISAdmin - Free tool for creating multiple websites on IIS5 ... IISAdmin - Tool for creating multiple asp.net websites on IIS5 and winxpGo
JavaScript Console - a DOS-like console ... recently had the need for a DOS-like console I could put in a browser and manipulate with JavaScript. Specifically, I needed a "window" with a fixed number of rows and columns...Go
Grid Inside a Grid ... This code snippet will help to create a Nested Grid. The sub grid depends on the each row element in the parent grid control .Go
Infragistics WPF XML DataGrid for .NET at Microsoft .NET Support ... xamDataGrid is UI component for .NET WPF applications developed by Infragistics, which can provides rich UI grid interface for you data. you can bind this control to ObjectDataProvider and XmlDataProvider.Go
Carousel(flying) Movement for Images using .NET DataGrid at Microsoft ... Now you can provide Carousel Movement or flying nature for images in .NET applications as shown in bellow picture by xamDataCarousel.Go
Displaying Row Details Tooltip on GridView using JQuery ... Displaying Row Details Tooltip on GridView using JQueryGo
DotNetKicks.com asp.net integration ... This class adds either a DotNetKicks image with your "Kick" count or a hyperlink to DotNetKicks.com for the specified url. These can be combined to display the "Kick It" icon as a link to DotNetKicks.comGo
Grayed out ASP.NET Toolbox Controls? Check your Mouse! ... Have you run into a problem with the ASP.NET where you can't access toolbox items for add-on controls? You're not the only one. Apparently there's a bug that causes some hardware configurations involving Microsoft Laser mice to cause problems with the idle state that the designer uses to refresh controls and certain designer aspects.Go
Create Date Calendar as User Control ... Create a Ajax enabled web site and create a Date User Control and copy paste the code listed below into the user control page after that drag and drop the on all the report pages that use Start Date and End DateGo
Delicious tagged ASP.NET Links
Using Routing With WebFormsGo
Rob Conery » ASP.NET MVC: Securing Your Controller ActionsGo
Scott Hanselman's Computer Zen - ASP.NET MVC Cheesy Northwind Sample CodeGo
Never Write an Insecure ASP.NET Application Ever AgainGo
ScottGu: ASP.NET, ASP.NET AJAX, ASP.NET MVC and .NETGo
ASP.NET 3.5 Extensions Preview : The Official Microsoft ASP.NET SiteGo
Matt Berseth: Building a Vista Style Folder Browser with ASP.NET 3.5 and a Custom Hierarchical DataSource ControlGo
How I lost my WinDbg virginityGo
ASP.Net Security TutorialsGo
Debugging Http or Web Services Calls from ASP.NET with Fiddler - Rick Strahl's Web LogGo
Scott Gu Blog Links
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/year 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 requiGo
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 ... 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
VS 2008 Web Deployment Project Support Released ... This past Friday we released the final RTW (release to web) support for VS 2008 Web Deployment projects.  You can learn more about it and download it for free here .  Web Deployment projects can be used with either the "ASP.NET Web Site" or "ASP.NET Web Application Project" options built-into VS 2008, and provide a few additional build, packaging and deployment options for you to use.  You can read an old tutorial post of mine here to learn more about they work. The VS 2008 Web Deployment Project version supports all of the existing features provided by the VS 2005 web deployment download.  It also adds additional support for: Easily migrating VS 2005 Web Deployment Projects to VS 2008 Web Deployment Projects Replacing output only if web deployment builds succeed IIS7 Support This RTW (release to web) version fixes bugs and adds some small features that people requested in the December CTP version we released last month.  Please make sure to run setup and uninstall any older version of the VS 2008 Web Deployment Project support you have installed before installing this final version.  VS 2008 Web Deployment Projects can be installed side-by-side with VS 2005 Web Deployment Projects - so there is no need to uninstall the VS 2005 version if you are still using it with older projects. More Deployment Features In my last link-listing post I pointed at the new Web Deployment Tool being released by the IIS team.  This tool works with both IIS6 and IIS7 and enables automated copy deployment, file synchronization, and migrating of applications onto web servers.  If you are looking for a great way to automate the deployment of your ASP.NET applications onto remote servers then this tool is definitely one to check out.  You can use VS 2008 Web Deployment Projects as a post-build step within your build environment to fix up last minute deployment settings - and then use the IIS Web Deployment tool to copy them remotely onto server machines.  Alternatively you can also use the IIS Web Deployment Tool to copy vanilla "ASP.NET Web Site" or "ASP.NET Web Application" projects to remote machines (no VS 2008 Web Deployment Project required). To learn more about the new IIS Web Deployment tool, read the walkthroughs at the bottom of this page (in particular the "Introduction to MS Deploy" one).  I will also be doing a blog post in the future that talks more about how to use it to automate your web server deployments. Hope this helps, ScottGo
Jan 24th Links: ASP.NET, ASP.NET AJAX, Visual Studio, .NET, IIS ... I just arrived back from my trip from Asia, and decided to celebrate (since I'm jet-lagged and can't sleep) with a new post in my link-listing series .  You can check out my ASP.NET Tips, Tricks and Tutorials page for links to popular articles I've done myself in the past. ASP.NET Extending the GridView to Include Sort Arrows : Scott Mitchell has a nice article that describes how to add a visual indicator to the GridView control to indicate the current sort order on columns. Using ASP.NET 3.5's ListView and DataPager Controls: Sorting Data : Scott Mitchell continues his ListView control series with a good article on enabling sorting scenarios with the new ListView control. Building a Grouping Grid with the ListView and LinqDataSource Controls : Matt Berseth has an awesome post that shows off using the new ListView control and LinqDataSource controls to build a hierarchical grouping grid.  A post to bookmark. Using the ListView, DataPager and LinqDataSource Controls : Matt Berseth has a good tutorial post that shows off using these new controls to join data from two database tables using LINQ. Some ASP.NET 3.5 ListView Control Examples : Mike Ormond has a nice post that provides a number of samples that show how to use the new ASP.NET ListView control.  For even more ListView articles, check out my last link-listing post which pointed to a bunch of them. Large File Uploads in ASP.NET : Jon Galloway has a nice post that provides some good details on handing large file uploads using ASP.NET. ASP.NET AJAX Four ASP.NET AJAX JavaScript UI Methods You Should Learn : Dave Ward has another great post in his series about ASP.NET AJAX's client-side JavaScript Helper Methods . Five Tab Themes Created for the ASP.NET AJAX Control Toolkit : Matt Berseth posts some really cool themes created for the ASP.NET AJAX Control Toolkit's Tab control. Very slick! CNN Style Scrolling Ticker with the Marquee Toolkit Control : Matt Berseth posts another great one that shows how to implement a scrolling marquee UI using the ASP.NET AJAX Control Toolkit. Visual Studio Did You Know?: Lisa Feigenbaum from the VB team has posted a really cool series of blog posts that talk about some of the new VS 2008 editor and IDE features.  Read Part 1: Intellisense Everywhere , Part 2: IntelliSense is now Transparent , Part 3: Ctrl+Tab to Navigate Windows , Part 4: What You Can Do with Debugger DataTips , and Part 5: VB IntelliSense now filters as you type . Web Server Settings for ASP.NET Web Application Projects can now be stored per user as well as per project : The VS Web Tools Team has a nice post that describes how you can now store web server settings per-user instead of per-project.  This is very useful for multi-developer scenarios (where you don't want to check-in these values into source control). Using Ctrl-Break to Stop VS Building : Steven Harman points out a cool tip/trick, which is that you can use the Ctrl-Break key within Visual Studio to kill the current compilation build.  A useful tip if you've accidentally kicked off a long build or get tired waiting for it to finish. Visual Studio 2008 Trouble Shooting Guide : If you run into any issues installing VS 2008, make sure to check out this blog post.  It details a bunch of common causes of failures, and how to fix them. .NET Marshaling between Managed and Unmanaged Code : Yi Zhang and Xiaoying Guo from my team in Shanghai have written a great MSDN article that describes how to use the marshaling interop features of the CLR to call native code.  One of the tools they highlight is an awesome P/Invoke Interop Assistant application they built that makes it much, much easier to generate p/invoke interop signatures when calling native methods.  A must-have tool for anyone doing native/managed interop! .NET Framework 3.5 Poster : Brad Abrams posts about the cool new .NET Framework 3.5 posters now available for download (now in multiple file formats). IIS Microsoft WGo
.NET Framework Library Source Code now available ... Last October I blogged about our plan to release the source code to the .NET Framework libraries , and enable debugging support of them with Visual Studio 2008.  Today I'm happy to announce that this is now available for everyone to use. Specifically, you can now browse and debug the source code for the following .NET Framework libraries: .NET Base Class Libraries (including System, System.CodeDom, System.Collections, System.ComponentModel, System.Diagnostics, System.Drawing, System.Globalization, System.IO, System.Net, System.Reflection, System.Runtime, System.Security, System.Text, System.Threading, etc). ASP.NET (System.Web, System.Web.Extensions) Windows Forms (System.Windows.Forms) Windows Presentation Foundation (System.Windows) ADO.NET and XML (System.Data and System.Xml) We are in the process of adding additional framework libraries (including LINQ, WCF and Workflow) to the above list. I'll blog details on them as they become available in the weeks and months ahead. Enabling Reference Source Access in Visual Studio 2008 Enabling .NET Framework source access within Visual Studio 2008 only takes a few minutes to setup. Shawn Burke has a detailed blog post that covers the exact steps on how to enable this in more depth here . If you run into problems or have questions setting it up, please post a question in the Reference Source Forum on MSDN here . Stepping into .NET Framework Library Source Once you follow the configuration steps in Shawn’s post above, you’ll be able to dynamically load the debug symbols for .NET Framework libraries and step into the source code. VS 2008 will download both the symbols and source files on demand from the MSDN reference servers as you debug throughout the framework code: Developer comments are included in the source files. Above you can see an example of one in the Dispose method for the Control base class. Sometimes you'll see comments that reference a past bug/tracking number in our bug/work-item tracking database that provides additional history about a particular code decision. For example, the comment above calls out that a particular field shouldn't be nulled to maintain backwards compatibility with an older release of the framework, and points to a backwards compatibility bug that was fixed because of this. Reference License The .NET Framework source is being released under a read-only reference license. When we announced that we were releasing the source back in October, some people had concerns about the potential impact of their viewing the source. To help clarify and address these concerns, we made a small change to the license to specifically call out that the license does not apply to users developing software for a non-Windows platform that has “the same or substantially the same features or functionality” as the .NET Framework. If the software you are developing is for Windows platforms, you can look at the code, even if that software has "the same or substantially the same features or functionality" as the .NET Framework. Summary We think that enabling source code access and debugger integration of the .NET Framework libraries is going to be really valuable for .NET developers. Being able to step through and review the source should provide much better insight into how the .NET Framework libraries are implemented, and in turn enable you to build better applications and make even better use of them. Hope this helps, ScottGo
ASP.net.com Community Links
Extending Base Type Functionality with Extension Methods ... Extension methods allow a developer to tack on her own methods to an existing class in the .NET Framework. For example, imagine that our developer created a method named StripHtml, that strips HTML elements from a string using a regular expression. By associating this method with the System.String class, it could be called as if it was one of the System.String class's built-in methodsGo
Kigg - Building a Digg Clone with ASP.NET MVC Part - 1 ... Learn how to develop a Digg like application with ASP.NET MVC, LINQ to SQL and ASP.NET AJAX.Go
iCallback & JSON Based JavaScript Serialization ... In this article, Muhammad examines how to accomplish JavaScript Serialization using ICallback and JSON.Go
Export Crystal Reports to PDF file ... Explains how you can export crystal reports to PDF, Excel, Word and HTML formats with ASP.NET application.Go
Building a Simple Blog Engine with ASP.NET MVC and LINQ - Part 2 ... In the second part of the article series about ASP.NET MVC Framework, Keyvan adds controllers to his blogging engine in order to describe how to use controllers in ASP.NET MVC and discusses some details related to controllers. He first discusses the concept of URL routing patterns and then explores the anatomy of a controller class. Finally, he examines how to implement the controllers in his sample blog application.Go
Working with Callback and Control Rendering (Manually) ... This article is mainly about callback and rendering controls but through this tutorial you can also learn many other things: how postbacks work, how rendering works, how to dynamically create server-side controls, how to create DataTables dynamically in memory to bind with, how to get server-side controls during client-side execution and set their properties, and how to register client-side events of server side control from the server-side code.Go
Accessing data using Language Integrated Query (LINQ) in ASP.NET WebPages – Part 1 ... This article comprises of two parts; Part 1 deals with the introduction to LINQ and LinqDataSource control in ASP.NET and describes how to define and retrieve an in-memory data collection and display data in a web page.Go
File Denial ... Learn techniques for letting authorized users download files from your ASP.NET web site while keeping unauthorized users out!Go
ASP.NET AJAX meets Virtual Earth – Part One ... Get up to speed with ASP.NET AJAX by building a simple Virtual Earth mashup.Go
Handling the back button from server code ... One common drawback of Ajax applications is the loss of the browser's back button. This article by Bertrand Le Roy shows how to restore it using ASP.NET 3.5 Extensions Preview and server code.Go
CodeProject.com ASP Links
DotNetSlackers.com Links
Smum County Modal Form for ASP.NET ... Improvements on the ModalPopupExtender control provided as part of the ASP.NET AJAX Control Toolkit.... 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
AjaxConnectedPageViewer ... With Microsoft ASP.NET AJAX 1.0, you can build more dynamic applications that come closer to the rich style of interruption-free interaction. This web part will give full insight of site collection as tree view and respective attributes in as a data grid, which are connected to each other.... 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
AJAXConnectableWebPart ... With Microsoft ASP.NET AJAX 1.0, you can build more dynamic applications that come closer to the rich style of interruption-free interaction. This web part will give full insight of site collection as tree view and respective attributes in as a data grid, which are connected to each other.... 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
Three Requests for ASP.NET 4 and VS 2010 ... I have three things that have been on my wish list for ASP.NET and/or Visual Studio that I'm curious to know what others think. I've mentioned some of these before on my blog or elsewhere - they're not exactly earth shattering and I'm not saying that I want them more than any other feature they might add. But each one would make my life at least a little bit easier, if they were included by default. So, in no particular order, here they are: Support For Generics in ASPX Markup Eilon posted not too long ago about this topic . The idea here is that you should be able to write controls that take advantage of generics, and be able to declaratively specify them within your ASPX/ASCX markup. This would allow for things like strongly typed DropDownList controls or even TextBoxes, and would also allow for MVC views to specify their ViewDataType without having to resort to code. In the WPF world, I understand that this can be done by using the x:TypeArguments attribute. As Silverlight 2.0 takes off, it would be great to see support for generics in its XAML markup, as well. Limiting the discussion to ASP.NET for the moment, what should the markup look like? Mikhail Arkhipov discussed some of the options and challenges 4 years ago, and apparently the solution was not trivial or I have to believe we would already have it. However, I have confidence in the ASP.NET team's ability to figure this one out. Save VS Preferences in the cloud Since VS 2005 we've been able to save out our VS preferences to disk and then import them. This is a great feature that I've never used - I just usually don't have access to my primary dev machine when I sit down at another one, and if it's a coworker's machine I don't want to mess with their settings. With things like pair programming, it can be tough to use customized settings since there is no easy way to swap back and forth depending on who's at the controls. What I would like to see is a way to recover my settings from "the cloud" so that I can get them anywhere I go via my Live ID or OpenID or whatever. Having a quick way to switch between a couple of these would make the pair programming scenario even better. I suggested this four years ago, and I still want it. Another option that might help this situation is being able to run VS from a USB drive, so that it's completely portable. This would be cool for the "walk up to any machine" scenario but a bit less useful in the pair programming scenario. I'd go for both. The other thing I think would be invaluable for the service method is that Microsoft would be able to mine data about users' preferences (with opt-in for the privacy paranoiacs) so that their future versions of Visual Studio would ship with defaults that were informed by thousands of real world users' preferences. Recursive FindControl Do a quick search for this and you'll find a number of similar implementations. This generic recursive findcontrol looks like a pretty good one, based on some code from Palermo and myself . Basically, these let you get a reference to a control even if it is not in the current control's Controls collection. This happens quite often with templated controls like CreateUserWizard or LoginView or MultiView, and having a recursive findcontrol is quite a bit more flexible than hardcoding the name with $ etc (see tip 4 here ). Since I found the need for this technique, I've been adding it to my Base Page class or common class in every ASP.NET project I work on, so it seems to me it should really be built into the framework. 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
A few more solutions to the dreaded ""Validation of ViewState MAC failed"" ... I posted about this some time ago. My previous post: Potential solution for "Validation of viewstate MAC failed"http://aspadvice.com/blogs/joteke/archive/2007/08/14/Potential-solution-for-_2200_Validation-of-viewstate-MAC-failed_2200_.aspx And the original one:ASP.NET 2.0 and "Validation of ViewState Mac failed" exceptionhttp://aspadvice.com/blogs/joteke/archive/2006/02/02/15011.aspx Now there's a few more solutions listed and explained with a nice sample code at: Validation of viewstate MAC failed error http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx by an ASP.NET Engineer. 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
ASP.NET MVC Framework Scaffold Generator 1.1 ... Hello, I have updated my MVC Scaffold generator to support the March CTP. You can download the program from http://www.twinforms.com/aspmvc-home.htm Following are its features: Ability to create a common controller that links all the Selected table's List and Add action. You can also view the demo screencast at http://www.twinforms.com/screencast/asp.net/mvc_scaffold/ -Guru Kathiresan http://www.twinforms.com... 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
Grayed out ASP.NET Toolbox Controls? Check your Mouse! ... I've heard from several of my customers that have upgraded to Visual Studio 2008 that they've been unable to access custom controls on the toolbox. It doesn't matter whether the controls were auto-installed or manually added. According to several of the customers the controls simply show greyed out and apparently disabled so that they can't be accessed. You can't access the controls on the toolbox although standard controls work just fine. It turns out that the cause is: Interaction with... 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
Getting up to speed with ASP.NET 3.5 and the 3.5 Extensions ... I get hundreds of email a day from customers. Yesterday I received three email with the same question. Do you have a few good links for getting up to speed with ASP,NET 3.5 So.... Here you go. ASP.NET 3.5 and Visual Studio 2008 http://www.asp.net/downloads/vs2008/ http://msdn2.microsoft.com/en-us/library/s57a598e.aspx http://msdn2.microsoft.com/en-us/vstudio/aa700830.aspx http://csna01.libredigital.com/?urvs5cn3s8 3.5 Extensions Links http://www.asp.net/downloads/3.5-extensions/ http://www.asp.net/learn/3.5-extensions-videos/... 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
How Scott Guthrie gets so much work done. ... I've known Scott for almost 10 years but when he hired me a few years ago I had no idea how much work he gets done. Apart from managing the teams that deliver a dozen products for Microsoft, he travels and speaks everywhere, writes these detailed blog posts, and seems to know everything that's going on everywhere. (Like if the www.asp.net site if down for 40 seconds in the wee hours of the morning.) Well, I've finally figured it out ! Check out this rare photo that PROOVES Scott Guthrie is... 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
How Scott Guthrie gets so much work done. ... I've known Scott for almost 10 years but when he hired me a few years ago I had no idea how much work he gets done. Apart from managing the teams that deliver a dozen products for Microsoft, he travels and speaks everywhere, writes these detailed blog posts, and seems to know everything that's going on everywhere. (Like if the www.asp.net site if down for 40 seconds in the wee hours of the morning.) Well, I've finally figured it out ! Check out this rare photo that PROOVES Scott Guthrie is... 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
Getting up to speed with ASP.NET 3.5 and the 3.5 Extensions ... I get hundreds of email a day from customers. Yesterday I received three email with the same question. Do you have a few good links for getting up to speed with ASP,NET 3.5 So.... Here you go. ASP.NET 3.5 and Visual Studio 2008 http://www.asp.net/downloads/vs2008/ http://msdn2.microsoft.com/en-us/library/s57a598e.aspx http://msdn2.microsoft.com/en-us/vstudio/aa700830.aspx http://csna01.libredigital.com/?urvs5cn3s8 3.5 Extensions Links http://www.asp.net/downloads/3.5-extensions/ http://www.asp.net/learn/3.5-extensions-videos/... 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 Sample Resume ... AJ... 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 and IE8 WebActivities ... One of the great things in readify is the ability to do Professional Development at scheduled intervals to keep up to speed with the latest industry technologies and advancements. My latest foray into this (amongst other things) has been looking at the ASP.NET MVC framework and Internet Explorer 8 WebActivities . Both of these technologies are quite cool and I wanted a way to learn about them both and link them in some way where I could learn about them at the same time. To that end, I created a solution in Visual Studio 2008 which utilises the ASP.NET MVC framework and allows a user to enter some fields to create an IE8 Web Activity definition. You can then view the XML definition, and click the 'Add' button to add that activity to Internet Explorer 8 as a proper web activity. The web activity generated is not particularly functional, but does allow previews, icon definition, execute actions, however has no current support for parameters. Again, not really intended as a fully fledged utility or application, but a good way to learn about both the MVC framework and IE8 activities. The solution can be downloaded here . Obviously, you need Visual Studio 2008, the ASP.NET MVC preview 2 framework , and have Internet Explorer 8 beta installed. Feel free to download, play, chop up etc... 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
Send Email with VB.NET windows application ... Send email with attachment using windows app by posting to ASP.net App... 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
IIS 6.0 - Disabling ASP.NET on all virtual directories, but one? ... One of my customer running IIS 6.0 had this special scenario where he would like to run ASP.NET 2.0 applications only on a single virtual directory on the entire server. He would like to isolate his Virtual Directory alone to have the ScriptMaps of ASP.NET, but not any other website or virtual directory or a folder. The ScriptMaps for a virtual directory would generally come from the master level properties. To get this in IIS manager, click on the "Web Sites" folder and get its properties...(read more )Go
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/year 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 requiGo
Want to Learn How to Use LINQ? Check out LINQPad! ... I was catching up with some of the people I follow on Twitter tonight (as a side note, I used to think Twitter was a waste of time but I'm actually finding it useful now days) and noticed that Scott Cate listed a link to a free tool called LINQPad.  Wow...I wish I would've known about this tool a few months back when I was working on different LINQ queries for an application.  It really simplifies building queries and also happens to be a great way to learn the LINQ syntax as well.  It was created by Joseph Albahari for the C# 3.0 in a Nutshell book. Here's a screenshot from the Website.  You can download LINQPad at http://www.linqpad.net .  I'm really impressed with it so far.  On a related note, if you're interested in seeing how LINQ, Lambdas and LINQ with Stored procedures can be used, you can download the sample ASP.NET 3.5 application I put together that will help get you started with the different options available in .NET 3.5.Go
Learning from your Burn Down chart ... The chart to the left represents the Burn Down chart for the Secret Server 4.1 release which shipped on March 14th 2008.  We have always shipped Secret Server on the published date (or in the early hours of morning the next day!) but this release pushed things a little too close for our liking.  What was the problem?  Did we take on too much?  Did we trade off scope like we are supposed to? Looking at the Burn Down we can see that our velocity was really low in the early stages of the release.  This was mostly due to some support issues that drained our development resources and also some staff shuffling on projects which lead to inefficiencies.  We were able to make up for this with a phenomenal increase in velocity in the final iterations.  Unfortunately this was achieved by using more team resources to accomplish the tasks.  While the increased velocity is good, it also means there was a greater rate of change in the codebase at a point where quality assurance was trying to stabilize the product.  Test Driven Development certainly helps by allowing us to lean on our regression suite of tests but it is still not ideal. So what went wrong?  We will be having a recap meeting later this week to determine how to improve our planning for future releases. We need to get back on track to our usual release schedule where we are ready for the actual release days before the release date (not bad for a small team with frequent releases!).  I think part of the problem was not planning properly for reducing scope.  We left one of the larger features of the release until the end (the Role Based Security feature) - then we didn't recognize that this feature could be thinned out to reduce scope but rather implemented most of the originally specified functionality.  Typically our team cannot easily change resources (cost) since most team members are committed to projects and cannot easily shift responsibilities.  We also can't change the date since customers are expecting a release on a particular date because sales and support have been giving this date out for a few weeks.  This only leaves scope as the final equalizer to make timely releases possible.  In future, we will need to be more careful to ensure that scope can always still be reduced if necessary. What does your Burn Down Chart tell you?   We are hiring!  Do you want to write beautiful code in a Test Driven, Refactored, Agile .NET software company in the heart of Washington DC and work on cool products ?  Take the code test and send your resume along with why you want to join Thycotic to tddjobs@thycotic.com .Go
Please question the need for whitespace ... I have blogged about this before but I think it is a common problem that is worth restating since it affect developers across our industry.  I noticed the following method recently and again the curious separation of sections by whitespace popped into my head: 1: private void CalcHeaderOffsets() 2: { 3: this .fs = new FileStream( assemblyPath, FileMode.Open, FileAccess.Read ); 4: this .rdr = new BinaryReader( fs ); 5: dos_magic = rdr.ReadUInt16(); 6: if ( dos_magic == 0x5a4d ) 7: { 8: fs.Position = 0x3c; 9: peHeader = rdr.ReadUInt32(); 10: fileHeader = peHeader + 4; 11: optionalHeader = fileHeader + 20; 12: dataDirectory = optionalHeader + 96; 13: // dotNetDirectoryEntry = dataDirectory + 14 * 8; 14:   15: fs.Position = peHeader; 16: pe_signature = rdr.ReadUInt32(); 17: rdr.ReadUInt16(); // machine 18: numDataSections = rdr.ReadUInt16(); 19: fs.Position += 12; 20: optionalHeaderSize = rdr.ReadUInt16(); 21: dataSections = optionalHeader + optionalHeaderSize; 22:   23: sections = new Section[numDataSections]; 24: fs.Position = dataSections; 25: for ( int i = 0; i < numDataSections; i++ ) 26: { 27: fs.Position += 8; 28: sections[i].virtualSize = rdr.ReadUInt32(); 29: sections[i].virtualAddress = rdr.ReadUInt32(); 30: uint rawDataSize = rdr.ReadUInt32(); 31: sections[i].fileOffset = rdr.ReadUInt32(); 32: if ( sections[i].virtualSize == 0 ) 33: sections[i].virtualSize = rawDataSize; 34:   35: fs.Position += 16; 36: } 37: } 38: } .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; } What is the purpose of the new lines at 14 , 22 and 34 ?  Are these separate blocks of logic?  Could they be better represented using "Extract Method "? One of the first things that I do with code when refactoring is remove all the line breaks and make sure I am comfortable with the logical flow of the code.  If lines don't logically flow together then I ask myself if the two pieces belong next to each other or if they should be different responsibilities in different methods. Ask yourself next time you leave a new line whether it is really necessary or is it a codesmell indicating poorly separated unrelated functionality? FYI:  The code above is taken from NUnit (AssemblyReader.cs) and is free software licensed under the NUnit license (Copyright 2007, Charlie Poole, http://nunit.org/?p=license&r=2.4 ).   We are hiring!  Do you want to write beautiful code in a Test Driven, Refactored, Agile .NET software company in the heart of Washington DC and work on cool products ?  Take the code test and send your resume along with why you want to join Thycotic to tddjobs@thycotic.com .Go
ASP.NET MVC In-Depth: The Life of an ASP.NET MVC Request ... The purpose of this blog entry is to describe, in painful detail, each step in the life of an ASP.NET MVC request from birth to death. I want to understand everything that happens when you type a URL in a browser and hit the enter key when requesting a page from an ASP.NET MVC website. Why do I care? There are two reasons. First, one of the promises of ASP.NET MVC is that it will be a very extensible framework. For example, you’ll be able to plug in different view engines to control how your website content is rendered. You also will be able to manipulate how controllers get generated and assigned to particular requests. I want to walk through the steps involved in an ASP.NET MVC page request because I want to discover any and all of these extensibility points. Second, I’m interested in Test-Driven Development. In order to write unit tests for controllers, I need to understand all of the controller dependencies. When writing my tests, I need to mock certain objects using a mocking framework such as Typemock Isolator or Rhino Mocks. If I don’t understand the page request lifecycle, I won’t be able to effectively mock it. Two Warnings But first, two warnings. Here's the first warning: I’m writing this blog entry a week after the ASP.NET MVC Preview 2 was publicly released. The ASP.NET MVC framework is still very much in Beta. Therefore, anything that I describe in this blog entry might be outdated and, therefore, wrong in a couple of months. So, if you are reading this blog entry after May 2008, don’t believe everything you read. Second, this blog entry is not meant as an overview of ASP.NET MVC. I describe the lifecycle of an ASP.NET MVC request in excruciating and difficult to read detail. Okay, you have been warned. Overview of the Lifecycle Steps There are five main steps that happen when you make a request from an ASP.NET MVC website: 1. Step 1 – The RouteTable is Created This first step happens only once when an ASP.NET application first starts. The RouteTable maps URLs to handlers. 2. Step 2 – The UrlRoutingModule Intercepts the Request This second step happens whenever you make a request. The UrlRoutingModule intercepts every request and creates and executes the right handler. 3. Step 3 – The MvcHandler Executes The MvcHandler creates a controller, passes the controller a ControllerContext, and executes the controller. 4. Step 4 – The Controller Executes The controller determines which controller method to execute, builds a list of parameters, and executes the method. 5. Step 5 – The RenderView Method is Called Typically, a controller method calls RenderView() to render content back to the browser. The Controller.RenderView() method delegates its work to a particular ViewEngine. Let’s examine each of these steps in detail. Step 1 : The RouteTable is Created When you request a page from a normal ASP.NET application, there is a page on disk that corresponds to each page request. For example, if you request a page named SomePage.aspx then there better be a page named SomePage.aspx sitting on your web server. If not, you receive an error. Technically, an ASP.NET page represents a class. And, not just any class. An ASP.NET page is a handler. In other words, an ASP.NET page implements the IHttpHandler interface and has a ProcessRequest() method that gets called when you request the page. The ProcessRequest() method is responsible for generating the content that gets sent back to the browser. So, the way that a normal ASP.NET application works is simple and intuitive. You request a page, the page request corresponds to a page on disk, the page executes its ProcessRequest() method and content gets sent back to the browser. An ASP.NET MVC application does not work like this. When you request a page from an ASP.NET MVC application, there is no page on disk that corresponds to the request. Instead, the request is routed to a special class called a controller. TGo
Loosely Coupled, Dependency Inversion and IoC ... A very good and easy-to-read article about loosely coupled design, Dependency Inversion and Inversion of Control (IoC). http://msdn2.microsoft.com/en-us/magazine/cc337885.aspxGo
Commerce Server 2007 Study ... I´m writing some posts about Commerce Server 2007, involving development, costs, administration, learning, and so on, at andrenobre.wordpress.com. I´ll translate it and put it here ASAP :)Go
No love for VB? ... I'm looking around on books that evolves around ASP.NET and I'm starting to see a common pattern among a lot of the books. In most cases, they are predominantly written in C# leaving no alternate code in VB. I know that C# is being pushed by a lot of developers to be a better choice (this is debatable), but I just don't understand why there is a favor towards a single programming language (C# in this case). I'm a VB programmer myself and I know that C# is pretty similar and shouldn't be hard to learn, but the same concern goes the other way around. If most technical books are written in VB, then I'm pretty sure that the C# community will have the same concern as well. Believe it or not, there are still plenty of VB programmers out there, and it looks like the resources available (books, articles, etc.) are getting slimmer by the day. I recently purchased Professional ASP.NET 3.5 in C# and VB and found it a great book since it caters to both programming languages. The price/value of the book is respectable as the authors took the time to accommodate both languages. So why don't the other authors do the same thing? Is this too much to ask for?Go
Cool Timeline API ... I recently happened upon this intriguing little API that provides a nice interface for displaying events on a timeline. It was pretty easy to get my head around it and it's pretty easy to setup and use. It's got a Google Maps-like scrolling interface that is very intuitive. If you're not sure what a timeline looks like, you might want to jump straight to an example before continuing. I've don't really like the standard options for browsing a blogs history which typically looks like this: January (10) February (5) March (11) ... Kind of boring, right? So, as a proof of concept, I created a little test project to see what an RSS feed would look like in a timeline. Here's what it looks like for a busy RSS feed like Techmeme (or, view live demo ): RSS feeds don't typically output an entire history so this example isn't all that practical. However, if I had access to the database I could pull in all the posts to create a full blog timeline. As far as practical applications go, I can think of a number of other scenarios for using an interactive timeline over a plain old list: Displaying event logs Order tracking Live event blogging New user registration News tickers Twitter? Take a look at the Simile Timeline page if you would like more information, documentation, or some better examples. You can also download my little test project/demo .Go










have suggestions for the site?
snappy@alligatortags.com