Disabling WcfSvcHost.exe when debugging projects

One of the many new WCF features in Visual Studio 2008 SP1 is a mechanism to control whether the built-in WCF test host application (WcfSvcHost.exe) should automatically launch when debugging other projects in a solution. Prior to this release, there was no way to control this without disabling WcfSvcHost.exe by removing the special ProjectTypeGuid that controls this feature from the .csproj file.


Now, you can simply right click on your WCF Service Library and select Properties. Then in the project properties area you should find a tab called WCF Options, which looks like this:



Simply uncheck the box to disable the WcfSvcHost.exe from starting when debugging other projects within your solution (such as your own custom host application). However, if you attempt debug the WCF Service Library directly (as the startup project), the WcfSvcHost.exe will still launch in that case.

May 20th Links: ASP.NET, ASP.NET AJAX, .NET, Visual Studio, Silverlight, WPF

Apologies for the sparseness of my posting the last few weeks – work and life have been busy here lately.  Below is a new post in my link-listing series to help kick things up a little.  Also check out my ASP.NET Tips, Tricks and Tutorials page and Silverlight Tutorials page for links to popular articles I’ve done myself in the past.

ASP.NET

  • Bulk Inserting Data with the ListView Control: Matt Berseth continues his awesome posts with one that shows how to handle bulk-editing of data using the ASP.NET ListView control in .NET 3.5.

  • Master-Detail with the GridView, DetailsView, and ModalPopup Controls: Another great post from Matt that describes how to cleanly handle a common data entry scenario.

  • Creating Great Thumbnail Images in ASP.NET: A really nice blog post by a different Matt that details an approach that generates high quality (and small) thumbnail images.

  • Warning the User when Caps-Lock is on: Scott Mitchell has a nice article that describes how to automatically detect and warn users in login pages when the caps-lock button is on.

  • ASP.NET Perf Issue: Large numbers of application-restarts due to virus scanners: Tess Ferrandez has a great post that details a debug session to determine why an ASP.NET application was restarting frequently (causing performance slowdowns).  The issue was a virus scanner that was causing files to be constantly updated.  Make sure to check out the logging code you can add to your application to identify restart causes like this.

ASP.NET AJAX

  • ASP.NET AJAX Progress Bar Control: Matt Berseth has another great article that describes his new ASP.NET AJAX Progress Bar control.

  • Faster Page Loading By Combining Multiple JavaScript files in Batch: Omar Al Zabir (founder of PageFlakes.com and author of the great Building a Web 2.0 Portal with ASP.NET 3.5 book) has a good article that describes the performance benefit of merging multiple JavaScript file downloads.  Note that .NET 3.5 SP1 will include a new script combiner feature that helps make doing this even easier.

  • Create ASP.NET AJAX Server Controls using the ScriptControl base class: Chris Pietschmann has a nice article that talks about how to build new ASP.NET AJAX server controls by deriving from the built-in ScriptControl base class.

  • Inline Edit Box and Postback Ritalin Beta: Dave Ward and Mike Davis have created a new CodePlex project for their popular Inline Edit Box and PostBack Ritalin ASP.NET AJAX controls.

.NET

  • 7 Ways to Simplify your code with LINQ: Igor Ostrovsky has a great blog post that talks about new code techniques you can use to improve your code using .NET 3.5 and the new language and LINQ features in it.

  • Visual LINQ Query Builder for LINQ to SQL: Mitsu Furuta has created a cool Visual Studio designer that allows you to graphically construct LINQ to SQL queries.  Also make sure to download download the latest LINQPad utility – which is invaluable for learning LINQ and trying out LINQ queries.

  • DataContracts without Attributes (POCO support): Aaron Skonnard has a good post that talks about a nice usability change with .NET 3.5 SP1 that allows you to serialize POCO (plain old objects) using the WCF serializers.

  • Ukadc.Diagnostics: Josh Twist pointed me at a new CodePlex project he is working on that extends the System.Diagnostics features in .NET to include richer logging features (SQL trace support, email support, etc).

Visual Studio

  • 11 More VS Short Cuts you Should Know: A great post that talks about a bunch of useful shortcuts to print out and remember when using Visual Studio.

Silverlight

  • 50 New Silverlight 2 Beta 1 Screencasts: Mike Taulty and Mike Ormond have put together 50 nice tutorial screen-casts that cover Silverlight 2 – all in their "spare time".  Wow.

  • AutoComplete for Silverlight TextBoxes: Nikhil Kothari has a nice blog post that demonstrates how he built an auto-complete behavior control for Silverlight. 

  • Silverlight 2 Pie Chart: Peter McGrattan has posted a nice control and article that demonstrates how to use a new Silverlight charting control he has written.

WPF

  • WPF week on Channel9: Watch 6 great videos on Channel9.  Each one includes interviews and demos with members of the WPF team talking about some of the awesome work that went into WPF 3.5 SP1 (read my blog post here for a summary of some of it).

  • WPF Testing and Application Quality Guide: Check out the 0.2 release of a free online book being developed by Microsoft that covers how to test WPF applications.  Definitely worth book-marking if you are doing WPF development.

  • WPF 3.5 SP1 StringFormat: Lester has a nice post that describes how to use the new StringFormat feature in WPF 3.5 SP1.  This makes it much easier to handle formatting of databound values.

Hope this helps,

Scott

May 20th Links: ASP.NET, ASP.NET AJAX, .NET, Visual Studio, Silverlight, WPF

Apologies for the sparseness of my posting the last few weeks – work and life have been busy here lately.  Below is a new post in my link-listing series to help kick things up a little.  Also check out my ASP.NET Tips, Tricks and Tutorials page and Silverlight Tutorials page for links to popular articles I’ve done myself in the past.

ASP.NET

  • Bulk Inserting Data with the ListView Control: Matt Berseth continues his awesome posts with one that shows how to handle bulk-editing of data using the ASP.NET ListView control in .NET 3.5.

  • Master-Detail with the GridView, DetailsView, and ModalPopup Controls: Another great post from Matt that describes how to cleanly handle a common data entry scenario.

  • Creating Great Thumbnail Images in ASP.NET: A really nice blog post by a different Matt that details an approach that generates high quality (and small) thumbnail images.

  • Warning the User when Caps-Lock is on: Scott Mitchell has a nice article that describes how to automatically detect and warn users in login pages when the caps-lock button is on.

  • ASP.NET Perf Issue: Large numbers of application-restarts due to virus scanners: Tess Ferrandez has a great post that details a debug session to determine why an ASP.NET application was restarting frequently (causing performance slowdowns).  The issue was a virus scanner that was causing files to be constantly updated.  Make sure to check out the logging code you can add to your application to identify restart causes like this.

ASP.NET AJAX

  • ASP.NET AJAX Progress Bar Control: Matt Berseth has another great article that describes his new ASP.NET AJAX Progress Bar control.

  • Faster Page Loading By Combining Multiple JavaScript files in Batch: Omar Al Zabir (founder of PageFlakes.com and author of the great Building a Web 2.0 Portal with ASP.NET 3.5 book) has a good article that describes the performance benefit of merging multiple JavaScript file downloads.  Note that .NET 3.5 SP1 will include a new script combiner feature that helps make doing this even easier.

  • Create ASP.NET AJAX Server Controls using the ScriptControl base class: Chris Pietschmann has a nice article that talks about how to build new ASP.NET AJAX server controls by deriving from the built-in ScriptControl base class.

  • Inline Edit Box and Postback Ritalin Beta: Dave Ward and Mike Davis have created a new CodePlex project for their popular Inline Edit Box and PostBack Ritalin ASP.NET AJAX controls.

.NET

  • 7 Ways to Simplify your code with LINQ: Igor Ostrovsky has a great blog post that talks about new code techniques you can use to improve your code using .NET 3.5 and the new language and LINQ features in it.

  • Visual LINQ Query Builder for LINQ to SQL: Mitsu Furuta has created a cool Visual Studio designer that allows you to graphically construct LINQ to SQL queries.  Also make sure to download download the latest LINQPad utility – which is invaluable for learning LINQ and trying out LINQ queries.

  • DataContracts without Attributes (POCO support): Aaron Skonnard has a good post that talks about a nice usability change with .NET 3.5 SP1 that allows you to serialize POCO (plain old objects) using the WCF serializers.

  • Ukadc.Diagnostics: Josh Twist pointed me at a new CodePlex project he is working on that extends the System.Diagnostics features in .NET to include richer logging features (SQL trace support, email support, etc).

Visual Studio

  • 11 More VS Short Cuts you Should Know: A great post that talks about a bunch of useful shortcuts to print out and remember when using Visual Studio.

Silverlight

  • 50 New Silverlight 2 Beta 1 Screencasts: Mike Taulty and Mike Ormond have put together 50 nice tutorial screen-casts that cover Silverlight 2 – all in their "spare time".  Wow.

  • AutoComplete for Silverlight TextBoxes: Nikhil Kothari has a nice blog post that demonstrates how he built an auto-complete behavior control for Silverlight. 

  • Silverlight 2 Pie Chart: Peter McGrattan has posted a nice control and article that demonstrates how to use a new Silverlight charting control he has written.

WPF

  • WPF week on Channel9: Watch 6 great videos on Channel9.  Each one includes interviews and demos with members of the WPF team talking about some of the awesome work that went into WPF 3.5 SP1 (read my blog post here for a summary of some of it).

  • WPF Testing and Application Quality Guide: Check out the 0.2 release of a free online book being developed by Microsoft that covers how to test WPF applications.  Definitely worth book-marking if you are doing WPF development.

  • WPF 3.5 SP1 StringFormat: Lester has a nice post that describes how to use the new StringFormat feature in WPF 3.5 SP1.  This makes it much easier to handle formatting of databound values.

Hope this helps,

Scott

Finding Freelance Work

I received a recent comment from Paul, asking how I found my "weekend gigs" or freelance development work. That's a pretty good question and the short answer (without sounding too presumptuous) is that God provides! The long answer is "I don't really know, it just seems to happen".

I started my career many years ago as a degreed mechanical engineer, fresh from college and looking for fame and fortune in the "oil business" (which in Texas is correctly pronounced "Awl Bidness"). Unfortunately, I arrived on the scene just in time to watch oil drop from $40 per barrel down to $7 per barrel which left myself and about 100,000 other engineers scrambling for any work we could find. (If you're a history buff or just follow the price of oil, you should be able to place my age within +/- 2 years from this information) Luckily, I landed a real engineering job for a valve manufacturer in Houston. I worked for that company for 18 years and watched it grow from $50 million in revenue to over $40 billion as it was acquired and reacquired over the next ten years. When I began with the company we had 300 employees and when I left the "company" we had over 240,000 employees and our CEO and CFO had just been indicted for tax evasion and securities fraud among other things. Care to guess the name of that company?

I held a number of engineering, product management and sales & marketing positions in that 18 year period and finally got tired of all the politics and corporate ladder climbing. So I asked the IT Director (a good friend) if he could find a position for me somewhere in the IT programming or operations area so that I could explore my love of computers, software and e-commerce. My friend and new boss gave me the opportunity to learn, do, and learn by doing and we had a blast. We put together that company's first web site, first e-commerce site and first B2B system using pre-release versions of Microsoft's SQL Server, BizTalk Server and Commerce Server. Over the next two years, with the help of some great people at Microsoft (yes, the Blue Monster really does have some great people) we designed and built a world-class B2B e-commerce system for (you guessed it) Tyco. One that has transacted literally hundreds of millions of dollars in transactions and is still in use almost ten years later.

My boss and I left Tyco, formed our own B2B consulting firm and as we had hoped, got Tyco as a client. The first year was great. We had lots of projects, worked 70 hour weeks and made good money. The second year taught us the lesson that most consultants come to call "going from feast to famine". We called it something else (mostly unprintable) but learned several valuable lessons from the experience. I learned that I'm not cut out to be a full-time consultant and for me, it's tremendously important to see "the fruits of my labors". Which is why I work for a great medium-size "private" company today and do my "freelance" work in the evenings and on the weekends "as my time and energy permits".

How do I find the work? I don't really. It just seems to find me somehow, but I can give you a few tips to get started!

  • Do volunteer work! It's good for the soul and opens you to all sorts of opportunities.
  • Give back to the community! Share your best work, start a blog or two. Post in the community forums.
  • Answer your email and every (non-spam) blog comment! It's amazing how word gets around the Internet.
  • Try something new! Life is way too short to always take the safe road. Learn a new programming language. Hell, learn a new language period.
  • Be courageous! Buy a Mac. Become a fanboy! Put an Apple sticker on your car.

Currently listening to Diana Krall's "The Look of Love".

Finding Freelance Work

I received a recent comment from Paul, asking how I found my "weekend gigs" or freelance development work. That's a pretty good question and the short answer (without sounding too presumptuous) is that God provides! The long answer is "I don't really know, it just seems to happen".

I started my career many years ago as a degreed mechanical engineer, fresh from college and looking for fame and fortune in the "oil business" (which in Texas is correctly pronounced "Awl Bidness"). Unfortunately, I arrived on the scene just in time to watch oil drop from $40 per barrel down to $7 per barrel which left myself and about 100,000 other engineers scrambling for any work we could find. (If you're a history buff or just follow the price of oil, you should be able to place my age within +/- 2 years from this information) Luckily, I landed a real engineering job for a valve manufacturer in Houston. I worked for that company for 18 years and watched it grow from $50 million in revenue to over $40 billion as it was acquired and reacquired over the next ten years. When I began with the company we had 300 employees and when I left the "company" we had over 240,000 employees and our CEO and CFO had just been indicted for tax evasion and securities fraud among other things. Care to guess the name of that company?

I held a number of engineering, product management and sales & marketing positions in that 18 year period and finally got tired of all the politics and corporate ladder climbing. So I asked the IT Director (a good friend) if he could find a position for me somewhere in the IT programming or operations area so that I could explore my love of computers, software and e-commerce. My friend and new boss gave me the opportunity to learn, do, and learn by doing and we had a blast. We put together that company's first web site, first e-commerce site and first B2B system using pre-release versions of Microsoft's SQL Server, BizTalk Server and Commerce Server. Over the next two years, with the help of some great people at Microsoft (yes, the Blue Monster really does have some great people) we designed and built a world-class B2B e-commerce system for (you guessed it) Tyco. One that has transacted literally hundreds of millions of dollars in transactions and is still in use almost ten years later.

My boss and I left Tyco, formed our own B2B consulting firm and as we had hoped, got Tyco as a client. The first year was great. We had lots of projects, worked 70 hour weeks and made good money. The second year taught us the lesson that most consultants come to call "going from feast to famine". We called it something else (mostly unprintable) but learned several valuable lessons from the experience. I learned that I'm not cut out to be a full-time consultant and for me, it's tremendously important to see "the fruits of my labors". Which is why I work for a great medium-size "private" company today and do my "freelance" work in the evenings and on the weekends "as my time and energy permits".

How do I find the work? I don't really. It just seems to find me somehow, but I can give you a few tips to get started!

  • Do volunteer work! It's good for the soul and opens you to all sorts of opportunities.
  • Give back to the community! Share your best work, start a blog or two. Post in the community forums.
  • Answer your email and every (non-spam) blog comment! It's amazing how word gets around the Internet.
  • Try something new! Life is way too short to always take the safe road. Learn a new programming language. Hell, learn a new language period.
  • Be courageous! Buy a Mac. Become a fanboy! Put an Apple sticker on your car.

Currently listening to Diana Krall's "The Look of Love".

I will be speaking at TechEd 2008

I will be presenting at TechEd 2008.  This will be my fourth time presenting at TechEd conferences.  This time I will be co-presenting with Todd Van Nurden and we are speaking on automated testing and deployment for BizTalk.  We are giving this presentation at the IT Professional week of TechEd and so our presentation won’t be completely geared towards development but one of the things we will be showing is how to deploy BizTalk using PowerShell. 


If you are going to be there stop by and say hello.


Here is the official Info:


SOA59-TLC Automated Testing and Deployment for BizTalk
Session Day/Time: 6/10/2008 3:00PM-4:15PM

I will be speaking at TechEd 2008

I will be presenting at TechEd 2008.  This will be my fourth time presenting at TechEd conferences.  This time I will be co-presenting with Todd Van Nurden and we are speaking on automated testing and deployment for BizTalk.  We are giving this presentation at the IT Professional week of TechEd and so our presentation won’t be completely geared towards development but one of the things we will be showing is how to deploy BizTalk using PowerShell. 


If you are going to be there stop by and say hello.


Here is the official Info:


SOA59-TLC Automated Testing and Deployment for BizTalk
Session Day/Time: 6/10/2008 3:00PM-4:15PM

Why do SOA projects succeed? Why do some fail?

I’m part of a curriculum advisory panel for California State University for an upcoming SOA program. As part of that, I spoke with someone there recently, relating real-world experiences, in a rather wide-ranging conversation. I started thinking “gee, I should write some of this down, it could be a good blog post”. So, here it is!

I’ll start off by saying that I could probably write a book about this, and there’s likely a bazillion of my peers that could co-author. Many have already written books about this. However, instead, I’m going to distill selected thoughts down into a soap box-ish ranting blog post. I have boiled down some key points into just a few phrases. Maybe it works, maybe the value gets lost in a haze of over-simplification. Maybe I should do a series of posts (but I have NO plans to do so!).

Think big, do small

I’d say the single most important factor is planning. And by that, I don’t mean lock a bunch of smart people in a room for a year and have them emerge with a detailed waterfall Gantt chart. I mean realizing that you’re embarking on a path that will transform the way you create, deploy and manage your business-critical applications. Done right, your enterprise becomes more agile, cost and time to deploy new functionality decreases, and you achieve the nirvana of code re-use we as an industry have been seeking for decades. Done wrong, and you’ll squander precious people resources and budget on an initiative with little or no return.

Mitigation: “boil the ocean” approaches fail. Think it all through, and then select some small services, then gradually pilot/deploy/build-up from there.

Think across the enterprise

In a large company with multiple IT sub-organizations, you need to have enterprise-level vision. Create a governing body. Identify a services portfolio. Without this, you could be doomed to costly inefficiencies such as duplication of efforts where multiple departments create different variants on a service, inconsistent naming, and eventually, a maintenance nightmare.

Mitigation: If you don’t already have an enterprise architecture group chartered with setting enterprise-wide standards and policies, form one.

Take a holistic view

A developer will write 12 lines of super elegant code and say “there, the service is done, you can deploy it now”. It’s no fault of the developer, in their opinion they are done. The problem of course is that you need a services management strategy, and that goes far beyond the realm of what the rank and file developer sees, or in most cases, beyond what they need to see, and certainly beyond what they usually think about.

Mitigation: Think about the entire lifecycle of a service. How will you deploy it? Is there an approvals process? How will you secure it? How will you manage it? How will you monitor it? How will you retire it?

Recognize the people challenges

SOA thinking moves people into the realm of message-oriented, or contract-first if you like, architectures. This requires a different mindset than traditional object-oriented or procedural architectures. You’re in a realm where everything is loosely-coupled, and operations often become asynchronous. I have seen firsthand at challenged client sites just how horribly wrong things can go if you try to apply object-oriented thinking and functional decomposition in a message-oriented environment.

Mitigation: recognize this paradigm shift, and invest in your people (architects and developers) to help them make the transition. Get them training and mentoring.

Recognize the infrastructure challenges

Creating an efficient operations environment for services is something that will be new to many IT folks. Your SLA’s will drive requirements such as high availability and response times. Policy-driven SLAs and policy-driven security add a layer of indirection that result in a more change-tolerant and resilient infrastructure.

Mitigation: Plan for the near-term future, but look to the long-term future to ensure the environment you are putting in place will be able to scale to meet future demands. Your tooling may be great when you have 6 services in production, but how will it be when you have 1,000?

Think beyond the technologies and into the processes

Today’s fast-paced world and rapidly changing business requirements of course lead to rapidly changing needs from the applications we create. Back when applications were monolithic silos, change came slowly, and evolution and deployments occurred at the monolith level. In a services-oriented world where there are numerous services acting as cogs in the machine, the new unit of deployment is at the service or service-composition level. Change is assured, and solution subset deployments become normal. “cowboy deployments” although almost always bad, in this type of environment become disastrous.

Mitigation: recognize Application Lifecycle Management as a key part of your process, and invest in it. Put procedures in place to assure repeatable, reliable builds. Have a testing strategy. Have a versionning strategy. Code migration should not be something people are afraid of.

Plan for disasters

An interesting side effect in the reuse of code assets by implementing intelligent stratification is that you inevitably build dependencies. For example, if all your services use an exception management service to log and respond to exceptions, what happens if that service is unavailable? The impact of a single service outage could ripple through your entire environment.

Mitigation: Think carefully about the dependencies, and architect and build robust services that incorporate mechanisms to respond to outages.

Benefiting from a successful SOA strategy is possible, but it’s something you (as an architect) need to think about. As technologists, we often naturally gravitate towards and get caught up in the technologies. However, there are many touch-points beyond just the technology decisions, what I’ve listed above are just some of the things I’ve observed out in the real world, out where people are actually implementing SOA-based initiatives. I’m hoping by posting this that I’ll help ease the path for some of you….

Technorati Tags: SOA,BizTalk,Service Oriented,ESB