Alliagator Tags Archive for Thursday, March 13 2008



DotNetKicks.com Links
ASP.NET MVC: Securing Your Controller Actions ... Many people on the forums want to know how to best protect Actions on their Controller using Forms Authentication. The MVC Team has done a nice job introducing Filters (using Attributes) to this latest drop of MVC, and in this post I'll show you how to create a filter that can handle security.Go
Testing TempData, and Mocking SessionState ... About a month and a half ago Ben Scheirman wrote about testing TempData in ASP.NET MVC. While I can easily understand what Ben's code is doing, what I couldn't figure out is why it worked. ... So, while Ben's code will definitely work, here's an extension method that can help with mocking out the session a little more "correctly":Go
DateTime.Round ... I recently needed to group by minutes (or seconds, or hours, or days) in a LINQ to SQL expression, and I found that there isn't a round function built into the C# DateTime object. The following will round to the nearest second, minute, hour, or day. I stopped there because different months have different numbers of days (and I don't need to group by months.) but it is easy enough to add months and years to the code.Go
Devconnections, HERE I COME! OOPS, help me decide. ... Devconnections questions a newby. Needs help answering them, but its a good read.Go
Real Time Stats With Google Analytics ... Here's a nice thing I found out this week: I was checking my site stats on Google Analytics and I found an easy way to see the real time stats of my blog!Go
How to run ASP.Net MVC on top of Mono ... More specific details about how to run MVC on Mono, with a downloadable code sample!Go
ASP.NET MVC: Store Routes in the Database ... Routing in the new .NEW MVC Framework is a synch to customize. This post shows how to move route definitions out of the global.asax.cs and into the database.Go
Firefox 3.0 XmlHttpRequest Default Content-Type change ... I ran into a small problem with some of my AJAX code that's checking content-type on inbound requests from the client - it looks like FireFox 3.0 is now including the charset on the content type from the client on POST operations which if not explicitly checked for can break existing code expecting only to see a content type. Small issue, but easy to miss especially in framework code like mine that frankly should have been prepared for this...Go
Windows Hosting rates are killing developers and Students... Is Micros ... I was shocked to get an email today morning from my close buddy, now can be called as a free lancer. He informed me that he had said a life long "goodbye" to Microsoft platform for ever, since he was constantly losing more money on hosting charges and some times even had to pay from his own pocket to survive. He informed me that he shall be working with Open Source Languages now onwards, and he did not regret a bit to leave Microsoft career for ever. He was keen to survive today, rather than be remembered as an .Net developer tomorrow. He used to be a C# Genius, and have been working on big projects.Go
BlogEngine.nET Extension to ping Live Search ... Mads created an extension that will automatically ping Live Search when there is an update to .Net Engine Blog. you blog will be indexed faster.Go
Updated Data Driven ASP.NET Resource Provider Posted ... I've update the source and samples for the wwDbResourceProvider component which provides an ASP.NET Resource Provider that is driven from resources stored in a SQL Server database. The tool also includes a real time ASP.NET resource editing front end and the abillity to import and export resources. This update fixes a few small bugs and enhances the ASP.NET resource editing front end with a few UI and AJAX tweaks.Go
7 Tips to Speed Up Windows Vista ... You can say whatever you want about Windows Vista but one thing is for sure, its not fast, In fact, it's slow. If you want great performance with Windows Vista you will need a new andGo
New FolderShare! ... Windows Live FolderShare, one of my favorite online services that let me sync certain folders across all my machines, launched a new team blog along with a brand new FolderShare version that includes a better performance and user experienceGo
ASP.NET Routing vs URL rewriting ... Brief experiment using ASP.NET MVC's routing mechanism to drive regular ASP.NET pages (with postbacks etc)Go
Delicious tagged ASP.NET Links
Scott Hanselman's Computer Zen - ASP.NET MVC Preview 2 Screencast TutorialsGo
Top 10 Best Practices for Production ASP.NET Applications - Daptivate > by Kyle BeyerGo
CodeProject: 10 ASP.NET Performance and Scalability Secrets. Free source code and programming helpGo
MIX07 /sessionsGo
Asp.NetGo
Using Routing With WebFormsGo
Brad Abrams : Mix08 Session Overview: Building Great AJAX Applications from Scratch Using ASP.NET 3.5 and Visual Studio 2008Go
Never Write an Insecure ASP.NET Application Ever AgainGo
Solution to ASP.NET Form - PayPal ProblemGo
20 Websites That Made Me A Better Web Developer | Six Revisions : Web Development and DesignGo
Why my ASP.NET AJAX forms are never submitted twice | EncosiaGo
ScottGu's Blog : ASP.NET 2.0 Tips, Tricks, Recipes and GotchasGo
ASP.NET AJAX > ASP.NET Model View Controller ApplicationsGo
Nikhil Kothari's Weblog : Ajax with the ASP.NET MVC FrameworkGo
Scott Gu Blog Links
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
Visiting China, South Korea and Japan the Next Two Weeks ... This Friday I'm leaving for a 10 day trip to Asia.  Traveling on business doesn't usually get me excited (I was on a plane ~70 times last year), but I am really looking forward to this trip as it will be my first trip to Asia.  I'll be visiting China (Beijing, Shanghai, Shenzhen), South Korea (Seoul), and Japan (Tokyo), and I will be presenting at events, meeting with customers, and visiting one of the development teams in my group that is based in China.  I'm also hoping to get a chance to see immerse myself a little in the countries. Below are some details on the presentations I'll be doing during the trip if you are interested in attending or learning more: China (Beijing, January 13th) China (Shanghai, January 14th) <= Update South Korea (Coex Conference Center 310 on January 17th) Japan (Izumi Garden Gallery in Roppongi, Tokyo on January 21st) I've been extremely fortunate the last year to have had some great people volunteer to translate my blog posts into other languages (including Chinese and Japanese).  Below are links to a few of the feeds if English isn't your first language: My Blog Posts in Chinese My Blog Posts in Japanese My Blog Posts in Spanish I'm hoping to meet Xuegen Jin (who has been translating my posts to Chinese and hosting them on HongChao Wang's site) and Chica (who has been translating my posts into Japanese) on the trip and have the chance to thank them personally. :-) Thanks, ScottGo
Dynamic LINQ (Part 1: Using the LINQ Dynamic Query Library) ... LINQ (language integrated query) is one of the new features provided with VS 2008 and .NET 3.5.  LINQ makes the concept of querying data a first class programming concept in .NET, and enables you to efficiently express queries in your programming language of choice. One of the benefits of LINQ is that it enables you to write type-safe queries in VB and C#.  This means you get compile-time checking of your LINQ queries, and full intellisense and refactoring support over your code: While writing type-safe queries is great for most scenarios, there are cases where you want the flexibility to dynamically construct queries on the fly.  For example: you might want to provide business intelligence UI within your application that allows an end-user business analyst to use drop-downs to build and express their own custom queries/views on top of data.  Traditionally these types of dynamic query scenarios are often handled by concatenating strings together to construct dynamic SQL queries.  Recently a few people have sent me mail asking how to handle these types of scenarios using LINQ.  The below post describes how you can use a Dynamic Query Library provided by the LINQ team to dynamically construct LINQ queries. Downloading the LINQ Dynamic Query Library Included on the VS 2008 Samples download page are pointers to VB and C# sample packages that include a cool dynamic query LINQ helper library.  Direct pointers to the dynamic query library (and documentation about it) can be found below: VB Dynamic Query Library (included in the \Language Samples\LINQ Samples\DynamicQuery directory) C# Dynamic Query Library (included in the \LinqSamples\DynamicQuery directory) Both the VB and C# DynamicQuery samples include a source implementation of a helper library that allows you to express LINQ queries using extension methods that take string arguments instead of type-safe language operators.  You can copy/paste either the C# or VB implementations of the DynamicQuery library into your own projects and then use it where appropriate to more dynamically construct LINQ queries based on end-user input. Simple Dynamic Query Library Example You can use the DynamicQuery library against any LINQ data provider (including LINQ to SQL , LINQ to Objects, LINQ to XML, LINQ to Entities, LINQ to SharePoint , LINQ to TerraServer , etc).  Instead of using language operators or type-safe lambda extension methods to construct your LINQ queries, the dynamic query library provides you with string based extension methods that you can pass any string expression into. For example, below is a standard type-safe LINQ to SQL VB query that retrieves data from a Northwind database and displays it in a ASP.NET GridView control: Using the LINQ DynamicQuery library I could re-write the above query expression instead like so:   Notice how the conditional-where clause and sort-orderby clause now take string expressions instead of code expressions.  Because they are late-bound strings I can dynamically construct them.  For example: I could provide UI to an end-user business analyst using my application that enables them to construct queries on their own (including arbitrary conditional clauses). Dynamic Query Library Documentation Included with the above VB and C# Dynamic Query samples is some HTML documentation that describes how to use the Dynamic Query Library extension methods in more detail.  It is definitely worth looking at if you want to use the helper library in more depth:   Download and Run a Dynamic Query Library Sample You can download and run basic VB and C# samples I've put together that demonstrate using the Dynamic LINQ library in an ASP.NET web-site that queries the Northwind sample database using LINQ to SQL: Basic Dynamic LINQ VB Sample Basic Dynamic LINQ C# Sample You can use either Visual Web Developer 2008 Express (which is free) or VS 2008 to open and run them. Other Approaches to ConstructGo
ASP.net.com Community Links
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
Introduction to SubSonic ... An introduction to SubSonic, a data-layer builder.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
Creating Derived Controls ... In the previous lesson you developed a composite control by assembling existing server controls. There is one more technique to add to the functionality of the existing controls. You can extend existing controls and add/customize functionality as per your requirement. This way you avail the core functionality of the base control to create a tailor-made control meeting your requirement. The designer features of Visual Studio such as smart tags and dialogs that are available for the base control continue to remain available for the derived control also.Go
Building a Simple Blog Engine with ASP.NET MVC and LINQ - Part 1 ... Microsoft released the first CTP of ASP.NET 3.5 Extensions and it includes ASP.NET MVC Framework as one of the main extensions for ASP.NET 3.5. In the first part of this article series about building a simple blog engine with ASP.NET MVC and LINQ, Keyvan introduces the MVC pattern, ASP.NET MVC Framework, and the fundamentals of a simple blogging engine.Go
Introduction To LINQ ... This article is an introduction to LINQ and provides examples of using LINQ to query objects, XML, and relational data.Go
CodeProject.com ASP Links
Google Maps in HTML, ASP.NET, PHP, JSP etc. with ease ... The Article will guide you with complete knowledge of how to add a google map in your webpage with knowledge of JAVASCRIPT, Use of Geocoder, Use of InfoWindow, Use of Marker, Tabbed Markers, Maximising marker, Creating context menu in your mapGo
Telerik Delivers Next Generation ASP.NET UI Components ... To build next generation websites, you need UI components that give you the power and flexibility to harness the speed of Ajax and rich experience of client-side programming. Telerik is delivering the UI component suite that meets all of these requirements with its RadControls for ASP.NET AJAX.Go
Dynamically adjusting the size of a drop-down list and adding color to the back-ground and fore-ground of the list items ... To adjust the size of the drop-down list dynamically at the client-side and adding back-ground and fore-ground color to the drop-down list.Go
Multiple File Upload User Control ... This article describes how to create a user control with event & properties.Go
UrlMappingModule ... Bringing MVC Framework-style URL redirections to classic ASP.NET 2.0 WebForms developmentGo
Schemaless C#-XML data binding with VTD-XML ... Agile, efficient XML data binding without schemaGo
ASP.NET Splitter Bar - Resize panels, table cells, and controls. ... VwdCms.SplitterBar is a server control that allows you to easily add resizing to your web page layout, now supports both vertical and horizontal resizing.Go
Multi Profile with Membership and Profile API ... Implement and maintain multiple profile of a user using Membership and Profile APIGo
Generic Object Tree For Synapse Controlled Relations ... A concept of building a tree and allowing each branch of the tree to associate to any object.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
ASP.NET Ajax Chat Application ... A chat room page using ajax and Linq to xmlGo
Ease your Model-View-Presenter ... This article describes how MVP integration in ASP.NET 2.0 can become easier with .NET generics and Hierarchy in PresentersGo
How to use google and other tips for finding programming help ... A primer for people looking to learn to help themselves find answers to programming questionsGo
Inside Vista Sidebar ... An insider look at the Vista Sidebar. Learn how the Sidebar works and how to optimize your Gadgets development.Go
DotNetSlackers.com Links
Using Routing With WebForms ... In my last post I described how Routing no longer has any dependency on MVC. The natural question Ive been asked upon hearing that is Can I use it with Web Forms? to which I answer You sure can, but very carefully. Being on the inside, Ive had a working example of this for a while now based on early access to the bits. Even so, Chris Cavanagh impressively beats me to the punch in blogging his own implementation of routing for Web Forms. Nice! One of the obvious uses for the new routing mechanism... 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
Videos on ASP.NET MVC from ScottH ... I just spent the last 3 hours watching all the latest videos available on the ASP.NET MVC MIX08 Preview Release: Part 1 - Displaying Data Part 2 - Editing Data and Making Forms Part 3 - Advanced Techniques Part 4 - Testing Developing ASP.NET Applications Using the Model View Controller Pattern, session from MIX08 If you haven't done yet, I recommend you to watch them all, especially the last one, which is summing up of all the first 4 screencasts, but enhanced with some technical... 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
Turn Anonymous Types into IDictionary of values ... Hers is one cool use I found for Anonymous Types (stolen from the ASP.NET MVC Framework): Use anonymous types to create and initialize a list of dictionary values which you can pass around:   void CreateADictionaryFromAnonymousType()        {            var dictionary = MakeDictionary(new {Name="Roy",Country="Israel"});           ... 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
Updated Data Driven ASP.NET Resource Provider Posted ... I've updated the code, samples and documentation for the wwDbResourceProvider project that provides a database driven Resource provider for ASP.NET. The tool provides two separate providers (one simple raw provider and one based on a full resource manager) as well an ASP.NET front end application that allows for dynamic resource editing and updating. You can find the download, white paper and online samples here: wwDbResourceProvider Home and Download Detailed White Paper Online Samples In this... 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 to videos: ASP.NET MVC ... I just ran across some really nice How to videos from Scott Hanselman on the ASP.NET MVC Preview.  They are very much demonstration-oriented and very explanatory. Here are the video's and links: (These links are subject to changing, but are accurate as of this posting) #1 | MVC Preview - Part 1 - Displaying Data 16 minutes, 41 seconds #2 | MVC Preview - Part 2 - Editing Data and Making Forms 18 minutes, 38 seconds   #3 | MVC Preview - Part 3 - Advanced Techniques 12 minutes,... 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
Graffiti 1.0 Service Pack 1 Now Available ... Today we released Graffiti 1.0 Service Pack 1 Announcement and details here Download here Quite a few things made it into Service Pack 1 - please see the link above for the full details - below is a quick summary: Developer and Designer - we added some new Chalk extensions, some events for developers to plug into so you can process behavior and data more easily in your own code, added support for background threading Security Enhancements - we made a handful of security improvements... 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
Multiple File Upload User Control ... This article describes how to create a user control with event & properties.... 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
Let`s tag all ASP.NET MVC contents with aspnetmvc ... One thing that is wrong with the ASP.NET MVC framework is the name: ASP.NET MVC Framework is too long, it's composed by 4 words, and so not easily usable as "tag". Usually social sites have problems when dealing with multi-word tags: some split them in more tags: ASP.NET MVC becomes ASP.NET and MVC other needs you to enter them with a + between the words: ASP.NET+MVC yet another behavior is using the underscore: ASP.NET_MVC Given all these different behaviors people tag posts, articles... 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 big changes since Dec CTP ... For more stuff on ASP.NET MVC, subscribe to my feed: http://feeds.feedburner.com/jeffreypalermoIf you installed the December CTP of the ASP.NET MVC Framework, you had to install it. The assembly was registered with the GAC, and you didn't have to deploy the assembly. The original plan was to release the MVC Framework with a service pack of .Net 3.5. That is no longer the plan.In the March CTP, System.Web.Mvc.dl, System.Web.Routing.dll, and System.Web.Abstractions.dll... 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 in CodePlex and Extensible Unit Testing ... Phil has some good thoughts on ASP.NET MVC preview 2 and beyond.  A couple of key things that I think are very cool with this project.   CodePlex builds -- The team is very exited to be  able to ship out the source code and unit tests for ASP.NET MVC through it's release cycle on CodePlex.    We will still do regular CTPs and Betas and RTMs, outside of CodePlex in the normal way.  But CodePlex allows more frequent releases if you want to watch the evolution... 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
Thoughts on ASP.NET MVC Preview 2 and Beyond ... At this years Mix conference, we announced the availability of the second preview for ASP.NET MVC which you can download from here. Videos highlighting MVC are also available. Now that I am back from Mix and have time to breathe, I thought Id share a few (non-exhaustive) highlights of this release as well as my thoughts on the future. New Assemblies and Routing Much of the effort and focus of this release was put into routing. If youve installed the release, youll notice that MVC has been factored... 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 fast is your ASP.NET DataGrid? ... I'm pleased to announce that the upcoming version ( Q1 2008 ) of RadGrid for ASP.NET AJAX (3.5 build ) will be extremely fast. Now the grid can handle for you millions of records in few milliseconds . Small running example can be found here . 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
Client Application Services - Articles ... Two new articles have been published for on the www.aspalliance.com. The two new articles are part of the 3-article series on Client Application Services. CLAS allow you to access the ASP.NET 2.0 Application Services from within Windows Client applications. Here is a link to both articles, and make sure to read them before article 3 comes in ;) Client Application Services - Part 1Client Application Services - Part 2 Hope you enjoy reading them! Regards ... 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
Review: ASP.NET Data Presentation Controls Essentials ... In this article, Brendan reviews the book Joydip Kanjilal has written with Packt Publishing. The book covers the Data Presentation Controls available in ASP.NET 2.0 as well as a small bit of mention of the new technology available in the 3.5 version. 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
Is Automatic Property Same as Property? ... I was listening one session on TechEd (night after long party, yeah) and I was thinking about automatic properties - are they really exact equivalent to usual properties? Something made me suspicious, so I opened my laptop at first free moment and checked out what's going on. At first let's write a little class. We will use it later to play with automatic properties. public class AutoPropTest{ private string name; public string Name { get { return name; } set { name = value; } } public string Name2 { get ; set ; } } This class has one usual property (Name) and one automatic property (Name2). Now let's compile this class and let's see how this class looks in Reflector after compiling. public class AutoPropTest{ // Fields [ CompilerGenerated] private string <name2>k__BackingField; private string name; // Methods public AutoPropTest( ) ; // Properties public string Name { get ; set ; } public string Name2 { [ CompilerGenerated] get ; [ CompilerGenerated] set ; } } Looking at the code we can see that usual property and automatic property are not synonyms of each other. Automatic property has unaccessible attribute to hold value. Also we can see there CompilerGeneratedAttribute that usual properties doesn't have. To be honest, automatically generated attribute is not unaccessbile - you can access it using reflection. Although I see no point why someone should access this attribute directly.Go
Prism First Drop ... Glenn Block & the Guys from Patterns & Practices just released to the public Prism First Drop, this drop includes a drat Reference Implementation (RI) which you can look and learn how to use the Prism. If you want to learn more about Prism, Glenn block and me are going to talk about it in less then a month at TechEd Eilat. Note that this is a code drop i.e. not all the functionality that is planned for the framework is currently implemented through you will be able to have a brief look at what you'll get during summer time. You are more then welcome to download and give us feedback on what you like what, you dislike and if you have other ideas that we might use, not all the ideas will be implemented by p&p, we are planning to open community prism project where with the help of the community we will implement some of the ideas. Download Prism First Drop Prism project page at CodeplexGo
Fixing Vista's Default Web Development Settings ... File this under "used to be easy with XP" tips and tricks for Vista. As a long time web developer on XP (all the way back to "classic" ASP), I feel I am pretty comfortable around IIS. I've successfully configured many a development site over the years and never really had much trouble. That's all changed with my recent upgrade to Vista Business and IIS7. Now, I didn't really notice the problem at first because I was using Visual Studio's built-in web server to test most of my sites (remember the days when that wasn't an option...). While doing some performance tests for Telerik, though, I was forced to leave Visual Studio and run a site in my shiny new IIS7. I created my new "application" just like I would have a Virtual Directory-based site in IIS6 and browsed the site in Firefox. Server Error. Server Error 500.19? Say what? I set-off checking my configuration files, making sure everything looked correct, confirming that my sites did work in Visual Studio's web server, and still, IIS served-up this "friendly" 500.19 error. So after some quick Googling (sorry Live Search, maybe after you buy Yahoo!'s search tech...I'll, er, um...give it another try...), I discovered that my wonderfully secure Vista Business installation disables ASP.NET development by default! ASP "classic" development is enabled; ASP.NET development is not. Really?! In this day and age of .NET, why would you enable IIS development features without enabling .NET support? In my opinion, this is a bad choice on Microsoft's part. Fortunately, the solution is easy. First, open your control panel and launch the Programs and Features interface (or type Programs in your Vista start search to find it quickly). Click on the "Turn Windows features on or off" side link.   When the the configuration window opens (and finally loads), look for the IIS settings section. You'll notice that it is "checked" with a blue box indicating not all sub-options are enabled. Expand the IIS node and look for the World Wide Web Services > Application Development Features section. You should see that the .NET Extensibility and ASP.NET sections are unchecked. Check the ASP.NET node and the .NET Extensibility node will automatically get checked, too. Click okay, wait a while, and you should be back in business. Hopefully this seemingly obvious tutorial will help someone out there with the unnecessary pain that comes with the XP to Vista developer transition. If you find yourself hitting the 500.19 Server Error, this is probably your solution.Go
Testing TempData, and Mocking SessionState ... About a month and a half ago Ben Scheirman wrote about testing TempData in ASP.NET MVC . It's good stuff, and aside from changes between Preview 1 and Preview 2, it still works fine. (See Scott Hanselman's post for some Preview 2-friendly mock helpers using Rhino Mocks.) While I can easily understand what Ben's code is doing, what I couldn't figure out is why it worked. If you reflect over TempDataDictionary (the type of the Controller.TempData property), you'll see that the data type it persists to the session is an internal structure. Ben's code, however, mocks out the Session to return the expected TempDataDictionary object. By all counts, that should fail, since the TempDataDictionary won't be getting back the values it expects--it expects the internal map structure. Well, it turns out I was glossing over one very important fact. TempDataDictionary was written to be smart enough that if the underlying session store either didn't work, or didn't provide the right data, TempData will continue to operate as normal--for the current request only . You can see below that if the session data was null or wasn't the right type, it just creates a new internal map. (image cut off for space) One of the benefits of TempData is the cross-request persistence via the session. You might not have known it, but when you call RedirectToAction in your controller action, for example, it's actually resulting in a 300-level HTTP redirect, which means an entirely new HttpContext for the next request. It's basically deferring to the browser to perform the redirect. So, while Ben's code will definitely work, here's an extension method that can help with mocking out the session a little more "correctly": public static void NullifySessionState(this HttpSessionStateBase session) { SetupResult.For(session[null ]).IgnoreArguments().Return(null ); session[null ] = null ; LastCall.IgnoreArguments(); } .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; }Go
How to know the all the data in the cache of an Asp.Net Application ... Hi, We all know about the use of caching in our application. With good use of cache we can increase the performance of the application considerably since application does not have to process the stuff again and again. But if we use too much of caching in the application, it can be problem. After all the data in the cache has to be stored in the memory and most of the application have limited memory. And more so in case of shared hosting. But how do you know how much amount of cache is being cached. This need to be calculated at the runtime to know the data in the cache. This can help individual understand the requirement of application and change the hardware (if required). You can also remove some caching, if you cannot increase the hardware. To find all the data in the cache based on the Key we can use the following code. foreach (DictionaryEntry de in this.Cache) { Response.Write(de.Key); Response.Write(" : "); Response.Write(de.Value); Response.Write("<br><br>"); } You can also bind the data to a Gridview with two bound column for key and value. This will shows us the amount of data in the cache for individual key. This can be super handy when you application is making big use of caching data. VikramGo
IE7 : This page contains both secure and nonsecure items ... I just spent about 4 hours trying to solve this really annoying error which only exists in Internet Explorer 7 (IE7) over a Secure (SSL) page. I just stumbled upon the solution and it was just so damn obscure I felt I had better write it down or it will be forever lost in the bit-bucket that I call my brain. Although my issue was related to using MIT’s Simile Timeline control it is not limited to that in any way (here is the URL to the defect ). So here is the error in question: When prompted with this, as a veteran in the web world, I first turn to standard proxy tools, like Fiddler . I look for the big gotchas where a HTTP request simple doesn’t go over HTTPS. Another is if any requests are throwing back a 404 (document not found). When that does help, next I common the IIS Log files, and see if anything is not going over port 443. Simply fix anything that behaves badly and re-test. When that does not fix the issue, what’s next? Well next you need to dig into iframes. If you have any iframes in your output (dynamic via Javascript/DOM or static on the page) be sure to specify the src attribute, and not just any src attribute will do. Options include “#”, or “javascript:void(0);” or even "javascript:'<html></html>';". Play with these and other which Google will turn up and decide which is your best option. My next inclination was to do a deep dive into the Javascript world and start debugging the crap out of things. This really did not bear much fruit at all. It was actually quite frustrating. –Try to avoid this as much as possible, but if you do make use of both the alert(‘’); and debugger; calls. Now when that does not bear any fruit it’s time to really dig deep. I found out that when you are manipulating a DOM element (lets say creating a DIV tag), and are setting its style.background property to a incomplete url, for example: div.style.background="url(/images/message-top-left.png) "; It seems that IE7 (and only IE7) will make this request over 443, but treat the data as one of these pesky “nonsecure items”. So, the work-around which I implemented was to specify the FULL url like: div.style.background="url(“+prefix+“/images/message-top-left.png) "; Where “prefix” is something along the lines of: prefix = document.location.protocol + "//" + document.location.hostname; Finally, if that is a dead end as well, consider the idea of cutting the feature out of the next release! References, more help: http://friedcellcollective.net/outbreak/2006/06/09/this-page-contains-both-secure-and-nonsecure-items/ http://support.microsoft.com/kb/925014Go
Atlanta Code Camp 2008 ... From the Atlanta Code Camp site: At long last, we are happy to announce registration for the 4th annual Atlanta Code Camp is now open . What: All day geek fest focusing on code and not marketing fluff. When: Saturday, March, 29, 2008 All day (doors open at 7:30) Cost: Free! (If you are not satisfied, we promise a full refund.) Where: Devry University in Decatur - 250 North Arcadia Ave, Decatur, GA 30030 (view map ) Speakers and Agenda : Currently being finalized. Check the www.AtlantaCodeCamp.com website over the next week to see the finalized version. To attend the event, you must register at the following link so that we can make sure to have food to feed you. http://www.clicktoattend.com/invitation.aspx?code=126492 . If you don't register, we can't guarantee that you will be eligible for food or swag. During the Code Camp, lunch will be provided at no cost to you. After the event, we are planning on gathering in a local eatery to continue any discussions which we were not able to complete by our 5:30 pm end time. Location information will be made available at the event. The Atlanta Code Camps have historically "sold out" extremely rapidly and we don't expect this time to be any different. Please register quickly to lock in your spot as we are capping registration and attendance due to facility limitations. If you miss the registration cap, contact volunteer@atlantacodecamp.com to see if we can come to some other arrangement, otherwise you will have to wait until next year's event. Don't miss out. We hope you can join us for this exciting and informative event.Go
Review of Excellent Book: Linq in Action ... "LINQ in Action" , published by Manning , is by far the best book available on Linq, both for those new to Linq and those already following it. The authors, Fabrice Marguerie , Steve Eichert , and Jim Wooley , have done a fabulous job of explaining Linq from the basics to the advanced. They even made it enjoyable to read, which makes it one of the best .Net books ever! The authors' introductory chapter shows us right away that this book is different by presenting a perfect balance of the problem, the history, and the solution. Linq is a huge subject, but the authors are up to it, and they quickly whet the readers appetite for all of Linq -- Objects, Sql, and Xml. We then get a very thorough explanation of the new language enhancements that Linq relies on, but which the authors clearly show to have uses of their own. The chapter on Linq's building blocks, covering sequences, query operators, query expressions, and expression trees, was especially instructive to me, even though I've followed Linq from the alpha days, so again I'm sure this book has something for everyone. The book then covers Linq to Objects very thoroughly, including common scenarios and performance considerations that other books never consider. The book then progresses to three chapters on Linq to Sql, which are of course my favorite since I'm really into O/R Mapping. The authors cover not just the basics to get beginners up to speed, but they also cover far more advanced content than I was expecting. For instance, they discuss not just the designer to setup mappings, but also the SqlMetal tool, and manual mappings using either attributes or xml. They also discuss the various concurrency options, the entity life cycle, inheritance, and more. The authors then give us three chapters on Linq to Xml, which again have something for everyone -- I especially like the chapter on common scenarios. The book finishes with a very thorough chapter on extending Linq, with a Linq to Amazon example, and a chapter that ties it all together with a real-world example that was gradually put together during the course of the entire book. The authors also provide additional support and material online, including a bonus chapter on Linq to Datasets. There is also downloadable code in both C# and VB, although the book actually shows both languages in most cases, and always points out the differences when there are differences between them. Disclaimer: I personally know Jim and have seen him present on Linq multiple times, Steve was a user of my WilsonORMapper, even contributing to it, and I've known Fabrice in the online world for quite some time too -- but I did very much enjoy and learn even more from their most excellent book on Linq.Go
My Latest Silverlight Articles ... Over the past few months I've been writing articles for the .NET Insight insight newsletter covering various ASP.NET AJAX concepts. You can read those article here . I've wrapped up that series and have started writing about Silverlight 1.0. Each week a new article will be published and I'll update them here so check back. The articles are designed to be focused and concise and get straight to the topic without a lot of fluff. Getting Started with Silverlight Using Microsoft's Silverlight Control in a Web Site Understanding Silverlight's createObject and createObjectEx Methods Silverlight XAML Primer 1: Exploring Canvases Silverlight XAML Primer 2: Rectangles, Ellipses, Lines and Text Silverlight XAML Primer 3: Working with Image Brushes Silverlight XAML Primer 4: Working with Linear Gradients Silverlight XAML Primer 5: Working with Radial Gradients Silverlight XAML Primer 6: Using Inline XAML with Silverlight Silverlight XAML Primer 7: Embedding Media into Silverlight Silverlight XAML Primer 8: Working with XAML Events Silverlight XAML Primer 9: Using the Silverlight Downloader Object Working with Events in Silverlight Silverlight XAML Primer 10: Creating a Silverlight Downloader Progress Bar Silverlight XAML Primer 11: Getting Started with Animations (New!) A video of a talk I gave on integrating Silverlight with ASP.NET AJAX and Web Services can be viewed here for those who are interested.Go
Windows Installer and Extensibility.dll ... Windows Installer is one of my favorite problem childs - of course, when it has mysteriuos problems. I found a problem when installing Outlook add-in on machine that has no extensibility features installed on it. Something was missing and installer gave me the famous "Unable to get installer types" error. After pointless waste of time tracing installer and checking its logs I checked out what's going on in file system. By default, Extensibility.dll was not installed. When I added it to setup package manually it was copied to application folder as expected. But still nothing happened. I was even able to create some packages that installed without errors but add-in was not installed. Cool, ah? Solution to this problem is simple. There is another version of Extensibility.dll that you can distribute and that is installed correctly without any problems. Seems like there are some legal issues with Extensibility.dll that is referenced by default. After creating add-in project using Visual Studio you have to delete reference to Extensibility.dll. Path to correct version of Extensibility.dll is as follows: C:\Program Files\Common Files\Microsoft Shared\MsEnv\PublicAssemblies\Extensibility.dll After adding correct reference, make sure you let Visual Studio to get the local copy of Extensibility.dll. You can see example on the image. Before deploying your setup package you must test it on "clean" machine that has no Extensibility.dll in Global Assembly Cache. If your setup works okay on clean machine and also your add-in works when you open Outlook to test it then everything should be okay what matters Extensibility.dll.Go










have suggestions for the site?
snappy@alligatortags.com