Entries Tagged '.NET' ↓
February 6th, 2008 — .NET, ASP.NET, Atlas, Link Listing, Visual Studio, 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
- .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.
Visual Studio
- 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 - which is the yield keyword. This is a very powerful feature that enables you to efficiently work with IEnumerable scenarios and enable deferred iteration (LINQ leverages this heavily with .NET 3.5). To master C# even more, I also highly recommend the new C# 3.0 In a Nutshell book (I posted a 5 star review of it on Amazon).
WPF
- Making VS 2008 Open in XAML Mode By Default: Matthias Shapiro has a nice post that shows how you can configure VS 2008 to by default load WPF files in XAML mode instead of design-mode. A very useful shortcut if your natural inclination is to work directly with XAML markup.
- How can I debug WPF bindings? Beatriz Costa from the Microsoft WPF team has a great post that talks about tips/tricks you can use to better identify "what went wrong" when a databinding expression fails with WPF.
- Programming WPF and Windows Presentation Foundation Unleashed: If you would like to learn WPF (especially now that there is project and designer support for it in VS 2008), I recommend these two books by Chris Sells and Adam Nathan. Both are excellent resources to use to learn from.
Hope this helps,
Scott
January 31st, 2008 — .NET, ASP.NET, Community News, IIS7, MVC, Silverlight, Visual Studio, WPF
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....
Scott
January 28th, 2008 — .NET, ASP.NET, Community News, Visual Studio
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,
Scott
January 24th, 2008 — .NET, ASP.NET, IIS7, LINQ, Link Listing, Visual Studio
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
ASP.NET AJAX
Visual Studio
.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!
IIS
-
Microsoft Web Deployment Tool Technical Preview 1: Yesterday the IIS team posted the first preview of a new Microsoft Web Deployment tool. This tool works with both IIS6 and IIS7 and enables automated deployment, synchronization, and migrating of applications on web servers. If you are looking for a great way to automate the deployment of your ASP.NET applications then this tool is definitely one to check out. To learn more, read the walkthroughs at the bottom of this page (in particular the "Introduction to MS Deploy" one). This tool is awesome and should make automated deployment much easier.
Hope this helps,
Scott
January 16th, 2008 — .NET, ASP.NET, Community News, Visual Studio
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,
Scott
January 8th, 2008 — .NET, ASP.NET, Community News, Talks
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:
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,
Scott
January 7th, 2008 — .NET, ASP.NET, LINQ, Visual Studio
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:
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:
You can use either Visual Web Developer 2008 Express (which is free) or VS 2008 to open and run them.
Other Approaches to Constructing Dynamic LINQ Queries
Using the dynamic query library is pretty simple and easy to use, and is particularly useful in scenarios where queries are completely dynamic and you want to provide end user UI to help build them.
In a future blog post I'll delve further into building dynamic LINQ queries, and discuss other approaches you can use to structure your code using type-safe predicate methods (Joseph and Ben Albahari, authors of the excellent C# 3.0 In a Nutshell book, have a good post on this already here).
Hope this helps,
Scott
January 4th, 2008 — .NET, ASP.NET, Atlas, IIS7, Link Listing, Visual Studio
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 AJAX
-
ASP.NET AJAX History How Do I Video: To learn more about the new ASP.NET AJAX history support, watch this great 15 minute video from Bertrand Le Roy of the ASP.NET team. He demonstrates how to AJAX enable an <asp:wizard> control, and then add history marker points to it.
ASP.NET MVC
-
Accessing Server Controls from CodeBehind with ASP.NET MVC Views: David Hayden has a good post that discusses a workaround for a bug with the current ASP.NET MVC CTP view templates - which prevents you from coding against server controls in view template code behind classes. You can right-click on the MVC view files and select "Convert to Web Application" to fix it. Alternatively, you can download updated MVC Templates that Troy Goode recently posted here. This issue will be fixed with the next MVC update.
Visual Studio
IIS 7.0
Hope this helps,
Scott
January 3rd, 2008 — .NET, ASP.NET, Atlas, Community News, Visual Studio
One of the great new features of VS 2008 is its support for framework multi-targeting. This enables you to use VS 2008 on .NET 2.0, .NET 3.0 and .NET 3.5 projects, and does not require you to upgrade your projects to the latest version of the .NET Framework in order to take advantage of new Visual Studio 2008 features (like JavaScript Intellisense, JavaScript Debugging, code editing, nested master pages, and the improved web designer and CSS features - all of which work with .NET 2.0, 3.0 and 3.5 projects).
ASP.NET AJAX 1.0 Multi-Targeting Support
VS 2008 out of the box allows you to open and edit existing ASP.NET 2.0 applications built with the separate ASP.NET AJAX 1.0 download we shipped last year. The VS 2008 multi-targeting support works just fine with these projects, and you can use the improved JavaScript and web designer support with them - while still targeting .NET 2.0 and ASP.NET AJAX 1.0.
New ASP.NET AJAX 1.0 Project Templates for VS 2008
Out of the box VS 2008 doesn't include project templates for creating brand new ASP.NET 2.0 with ASP.NET AJAX 1.0 applications. Right before Christmas we shipped a web free web download for VS 2008 that enables these project templates options. You can download them here (note: you also need to make sure you have ASP.NET AJAX 1.0 installed on your machine in order to use them).
Once these additional project templates are installed, you can use File->New Project or File->New Web Site within VS 2008 to create ASP.NET AJAX 1.0 applications that run on ASP.NET 2.0:
New ASP.NET AJAX 1.0 Web Site:
New ASP.NET AJAX 1.0 Web Application:
Applications built using these project templates do not require .NET 3.5 to be installed on a server in order to work - you can copy them to any existing web server that has .NET 2.0 and ASP.NET AJAX 1.0 installed and they will work fine.
Hope this helps,
Scott
December 16th, 2007 — .NET, ASP.NET, Link Listing, Visual Studio, 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 AJAX
ASP.NET MVC
Visual Studio
-
Spell Checker for Visual Studio: My team recently shipped a cool new Visual Studio add-in that provides spell checking support. In addition to supporting spell checking within HTML files, it also supports spell checking within JavaScript, VB, C# and ASP.NET comments. Works with both VS 2005 and VS 2008.
Debugging .NET
IIS 7.0
-
Behavior Changes for ASP.NET applications running in Integrated Mode on IIS 7.0: Mike Volodarsky from the IIS team has a great blog post that details behavior changes for ASP.NET applications when they run in "integrated mode" on IIS 7. "Integrated mode" enables ASP.NET developers to take advantage of much tighter integration with IIS - and enables a host of additional scenarios (richer URL rewriting, integrated authentication/authorization, etc). If one of the behavior changes listed in Mike's document impacts your application, you can optionally change the application to run in "Classic Mode" - which maintains the same ASP.NET behavior as with IIS6.
WPF
Hope this helps,
Scott