TechNet Webcast: BizTalk Server 2009 Performance on Hyper-V and Physical Deployments (Level 300)

I’m presenting a webcast on BizTalk Performance this Tuesday September 01, 2009 1:00 PM Pacific Time along with Trace Young who wrote the majority of the BizTalk Documentation.  We’ll be covering a summary of all the performance tests we’ve performed in the lab this year and answering any questions.  Please tune in if you have any performance related questions or if you just want to see what we have been up to. 


 Registration link is here:


http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032416252&EventCategory=4&culture=en-US&CountryCode=US


 

Register for Code Camp Auckland, 13 September 2009 – Development | SQL | Security

Register for Code Camp Auckland, 13 September 2009 – Development | SQL | Security

Code Camp Auckland is coming fast – 13 of September 2009, the Sunday before Tech Ed. With many international and local speakers, this is the biggest Code Camp ever.
If you want to catch some free  sessions on the state-of-the-art in .NET development, SQL Server and developer security  then sign up for Code Camp Auckland 2009 […]

Webcast on WS-ReliableMessaging in WCF

I’ve added a new webcast on http://www.cloudcasts.net.
This webcast shows how the WS-ReliableMessaging standard can be used in WCF to increase the reliability of message transmission across unreliable transports. The Fiddler tool will be used to examine how WCF creates a reliable session, and how messages and message acknowledgements are transmitted across the wire. The effects of blocking messages will be examined with reliable messaging turned off and on, and with the ordered delivery options enabled and disabled.
Get it here.

BIG FIRE

I was sitting at a local drinking establishment, and I saw this massive fire in the distance, we were about 20 klms away, yet we could clearly see the flames…

I cam home a little later, and checked the news channels, there was no mention of this, did I get a scoop or something??? Well no, it is more perhaps an example of how poor the news service is in this country… shame shame….

Have a look at the picture here http://blog.paul.somers.com/bigfire.pg

Multi-Targeting Support (VS 2010 and .NET 4 Series)

Multi-Targeting Support (VS 2010 and .NET 4 Series)

This is the third in a series of blog posts I’m doing on the upcoming VS 2010 and .NET 4 release.

Today’s post discusses VS 2010’s enhanced multi-targeting support – which allows you to use and target multiple versions of .NET.  We did significant architectural work in the VS 2010 release to enable a number of new multi-targeting features, and provide a much better experience.

Understanding Side-by-Side

VS 2010 can be installed “side by side” with previous versions of Visual Studio.  What this means is that you can install it on the same machine as VS 2008/VS 2005/VS 2003 – and use all of the versions at the same time if you’d like.

.NET 4.0 can also be installed “side by side” with previous versions of .NET on the same machine.  .NET 4.0 has a new version number for both the framework libraries and CLR engine – which means it runs completely independently from .NET 2.0, 3.0 and 3.5.  What this means is that you can install .NET 4.0 on a machine that has .NET 2.0/3.0/3.5 installed, and configure some applications to run using .NET 4.0 and others to run using the older .NET versions (the IIS admin tool allows you to configure this for ASP.NET applications).  This allows you to use .NET 4.0 for new applications – without having to necessarily test and upgrade all your existing ones.

VS 2008’s Multi-Targeting Support

VS 2008 was the first release of Visual Studio that included multi-targeting support for .NET.  What this meant was that you could use VS 2008 to create and edit not only .NET 3.5 projects, but also .NET 3.0 and .NET 2.0 projects as well.  This allowed developers to more quickly upgrade and take advantage of new Visual Studio tooling features – without having to necessarily require the newer version of .NET to be installed on the clients and production servers running their applications.

VS 2008’s multi-targeting support was able to take advantage of the fact that .NET 2.0, .NET 3.0, and .NET 3.5 all ran on top of the same version of the CLR – and that the primary difference between the .NET versions was in their framework libraries.  As a result, Visual Studio’s compilers were able to generate the same IL output, the debugger was able to debug against the same CLR engine, and the IDE support for multi-targeting was primary focused on filtering out new assemblies and project templates from showing up when they weren’t supported with a given .NET version.

This multi-targeting experience worked – although it wasn’t perfect.  Intellisense within VS 2008 always shows the types and members for the .NET 3.5 version of a framework library (even if you are targeting .NET 2.0).  This means that you can sometimes inadvertently end up using a method that is only in ASP.NET 3.5 even when you are working on a ASP.NET 2.0 project.

VS 2010’s Multi-Targeting Support

We made some pretty major architectural changes with VS 2010 to enable much better and more accurate multi-targeting support.

VS 2010 now ships what we call “reference assemblies” for each version of .NET.  A “reference assembly” contains only the metadata of a particular framework assembly – and not its actual implementation (making it much smaller in size on disk).  This metadata is enough, though, to ensure that VS 2010 can always provide 100% accurate intellisense when targeting a particular version of the .NET framework. It also means that properties exposed through the property grid within designers, API listings within the Object Browser, and all the other various places within the IDE accurately reflect the exact API version signature.

We also updated the VS 2010 debugger, profiler and compilers to be able to target multiple versions of the CLR.

Using VS 2010’s Multi-Targeting Support

To get a better understanding of how these new multi-targeting features work, let’s create a new ASP.NET Web Application using VS 2010.  To-do this we can use the “File->New Project” menu command to bring up the “New Project” dialog.  We’ll use the version drop-down at the top of the dialog to filter the project templates to only show those supported with .NET 2.0.  We’ll then create a new ASP.NET 2.0 web application project:

step1

Because we are targeting .NET 2.0 with this project, VS 2010 will automatically filter the toolbox and markup intellisense to only allow us to use those controls that shipped in ASP.NET 2.0.  Unlike VS 2008, the VS 2010 property grid now automatically filters to only show those properties that were supported on the ASP.NET 2.0 button control: 

step2

When writing code, VS 2010 will also now only show code intellisense for those types and methods/properties/events supported with .NET 2.0.  Below you can see intellisense for the ASP.NET 2.0 “Response” object when we type “Response.Re”:

step3

When we run the application using the built-in VS web-server, it will run using the ASP.NET 2.0 version (and the VS 2010 debugger will debug the CLR 2.0 process):

step5

Moving a Project from .NET 2.0 to .NET 4.0

We can optionally retarget our project to work with a later version of .NET by right-clicking on the project within the solution explorer and by bringing up its properties dialog.  We can select the “target framework” dropdown within it and select the version of the .NET Framework we want to target:

stp8

We can choose from a variety of different .NET versions above.  Included in the list is the "Server Core” profile that supports the GUI-less version of Windows Server 2008 R2 – and which does not support certain APIs.  Because the reference assemblies we use for metadata and intellisense can support any version or release, we’ll even be able to distribute versions of them with future service packs if they introduce any new APIs (enabling 100% accuracy).

For this walkthrough, we’ll choose to move the project to use .NET 4.0.  When we do this, VS 2010 will automatically update the project reference assemblies and the web.config file of our project to properly reflect the new version.

Once we do this, VS 2010 will filter the toolbox and markup intellisense to show us all of the new controls and properties available in the ASP.NET 4.0 version.  For example, the property grid below now displays the new “ClientIDMode” property available on all controls in ASP.NET 4.0 – which gives you the ability to control how client id’s are output and avoid ugly client ids (a new ASP.NET 4.0 feature I’ll cover in a later blog post):

stp9

Now that we’ve upgraded the project to use .NET 4.0, VS 2010 will also now show us code intellisense for the new types and methods/properties/events on types in .NET 4.0.  For example, below you can see some of the new redirect methods available on the ASP.NET 4.0 “Response” object (which previously did not show up when the project was targeting .NET 2.0):

step7

The new Response.RedirectPermanent() method above makes it easy to issue “HTTP 301 Moved” responses – which can avoid your site accumulating stale links in search engines. The URL Routing engine is now supported by both ASP.NET Web Forms and ASP.NET MVC based applications, and the new Response.RedirectToRoute() method allows you to easily redirect to a route declared with it.

And lastly when we run the application using the built-in VS web-server, VS 2010 will now run it using the ASP.NET 4.0 version:

step9

Summary

VS 2010’s multi-targeting support enables you to work on projects that target .NET 4.0, .NET 3.5, .NET 3.0 and .NET 2.0.  It will allow you to start taking advantage of the new tooling features, without having to immediately upgrade the clients and servers running your application’s to .NET 4.0.  The improved multi-targeting support will ensure that this experience is even better and more accurate than before. 

Hope this helps,

Scott

P.S. In addition to blogging, I have been using Twitter more recently to-do quick posts and share links.  You can follow me on Twitter at: http://www.twitter.com/scottgu (@scottgu is my twitter name)

How to save password for WCF Adapter in BizTalk binding file

Generally, it is not recommended to store passwords in the binding file and by default BizTalk administration UI clears it out when exporting binding to the xml file. But in development environment where you have automatedcontinuous integration build and deploymentnot having password in the binding file will prevent application from starting and CI process fail. It can become tedious in staging deployments (TEST, UAT) as well, especially if you have multipleendpoints that use accounts with passwords. In such cases, having password for development account (hopefully not the same as production)in binding file can make life easier.

To do that, export binding file after application is fully configured. Open it and locate section(s) with configuration for the ports/locations of interest. For example for the WCF receive location it will be in:

<ReceiveLocationTransportTypeData>&lt;CustomProps&gt;…&lt;/CustomProps&gt;</ReceiveLocationTransportTypeData>

Find emtpy password tag in this section that will look like:

&lt;Password vt=”1″/&gt;

Change it to enclose you password value and vt attribute value to “8”:

&lt;Password vt=”8″&gt;MyPassword&lt;/Password&gt;

Save and use this binding for an automated deployment script.

Starter Project Templates (VS 2010 and .NET 4.0 Series)

Starter Project Templates (VS 2010 and .NET 4.0 Series)

This is the second in a series of blog posts I’m doing on the upcoming VS 2010 and .NET 4 release.

Today’s post is about another small, but I think nice, change coming with VS 2010 and ASP.NET 4 when you create new ASP.NET Web projects – which is the ability to create both “Empty projects” as well as to create projects that already have some layout and common functionality included in them, and which can help you get started when building a new application.

Creating New Projects

When you use the File->New Project or File->New Web Site menu commands within VS 2010, you’ll see a “New Project” dialog like below that allows you to filter by language and application type and select different project templates to use when creating new projects:

newproject1

VS 2010 ships with “empty” project templates for creating new ASP.NET applications – which will create minimal projects with just the bare essentials needed to get going.  My last post in this series included a screenshot that shows what the “Empty ASP.NET Web Application” project template creates when you use it to start a new application.

Creating a New Project using a Starter Template

VS 2010 also ships with starter template projects that allow you to create a new ASP.NET application that has some layout/CSS structure and common functionality already implemented within it. 

We first tried this concept with ASP.NET MVC 1.0 – whose project template provides a master page, CSS file, JavaScript libraries, login system, and a “home” and “about” page already wired up and implemented.  VS 2010 adds support for this idea when creating new ASP.NET Web Forms projects as well. 

When you choose the default “ASP.NET Web Application” project template, you’ll find that the ASP.NET Web Forms project created already has some directories and files contained within it:

template1

It includes a Site.Master master page file that provides an overall layout for the site (with headers, footers, etc), and which uses a CSS stylesheet for all styles.  It has a “Scripts” directory that contains jQuery within it (ASP.NET AJAX is available via the script manager control).  It includes a “default.aspx” and “about.aspx” pages in the root directory that are based on the master page and include some boiler plate content.  And it includes an “Account” directory that has some pages that implement a forms-based authentication system for users to log-in, register and change their passwords:

template2

You can run the project without having to write any code or configure anything, and get a nice site up and running:

template3

The site has full support for forms based security authentication, and is pre-wired up to use the ASP.NET Membership system for password management:

template4

All of the styles and content within the site are configured using CSS, and take advantage of some of the new features with Web Forms in ASP.NET 4 – including clean client-side “id” names (no more ctrl_ mangled names – ASP.NET 4 gives you complete control over the client id), and CSS based rendering instead of table based rendering for the built-in server controls.  I’ll discuss these new Web Forms features in a lot more depth in later posts in this series (along with a lot of other features being added).

Online Template Gallery

In addition to the built-in project templates, VS 2010 also support the ability when inside the “New Project” and “Add Item” dialogs to search an online gallery of additional templates to use.  You can contribute your own templates to the gallery, rate and review submissions of others, and search and filter them by project type, keyword and community rating.  You can then easily download and install any template locally directly within the dialog:

template5

This will hopefully facilitate the creation of lots of useful project starter kits (of all types of projects – not just web) that people can easily discover and use to quickly get going when building solutions.

Hope this helps,

Scott

P.S. In addition to blogging, I have been using Twitter more recently to-do quick posts and share links.  You can follow me on Twitter at: http://www.twitter.com/scottgu (@scottgu is my twitter name)