by community-syndication | Nov 15, 2010 | BizTalk Community Blogs via Syndication
Back from TechEd in Berlin, a great week with great technology. I focused my interests around Architecture, Azure, AppFabric (hosting WF/WCF) and BizTalk, but the talks that I liked the most were in other technologies, such as PowerPivot (amazing session by Rafal Lukawiecki., where he opened an Excel file with 101 million rows while using around 200 Megs of RAM), Umbraco (a surprisingly interesting Open Source CMS) and oData (feed-based info distribution and management). Also attended varied sessions on “LiveLabs” Pivot (now Silverlight PivotViewer)), Office 365 (very, very promising, but what about access to the beta??), Agile Project Management, HTML5, and others. And still found the time to do some Hands-On-Labs. 🙂
I did not attend TechEd last year, and this was a most refreshing return.
You can download several session videos from TechEd Online.

by community-syndication | Nov 15, 2010 | BizTalk Community Blogs via Syndication
Recently the book ’Applied Architecture Patterns on the Microsoft Platform’ was released. The book is written by Richard Seroter, Stephen Thomas, Ewan Fairweather, Mike Sexton and Rama Ramani. Yossi Dahan is the technical reviewer. The book is published by Packt Publishing. Shortly before the book was released, an event was held in Stockholm, Sweden. […]
by stephen-w-thomas | Nov 15, 2010 | Stephen's BizTalk and Integration Blog
It has been over a year since my list issue of The BizTalker. With all the excitement in the air about BizTalk in the cloud and AppFabric, I figured now is a good time to bring back the newsletter. I am planning to send out a new issue monthly with the next one in just a few days. I am reaching out to various 3rd parties to try to get some freebies to give away for future newsletters.
In the next issue you will have a chance to win a copy of my new book plus an exclusive discount to order it online.
If you are not a member of The BizTalker, sign up now at: http://www.biztalkgurus.com/newsletter/index.aspx
by community-syndication | Nov 13, 2010 | BizTalk Community Blogs via Syndication
The call for sessions is now open for SoCal Codecamp IV. If you’ve never been to one, Codecamp is a great way to see sessions from the community, for free. Have an idea or a session you’d like to present? Submit it! Want to go? Visit SoCalCodeCamp.com to register.
I missed the last one, and felt guilty about it, so I just submitted the sessions below. Hope to see you there!
Windows Azure Overview
Cloud technologies are transformational, and one of those rare paradigm shifts that we don’t see often. The Windows Azure platform represents a tremendous investment by Microsoft, one that developers can benefit from today. Some of the results of those investments are live today, and you can use them to enable solutions that previously would have been impossible or prohibitively expensive to create. This session will provide an overview of Microsoft’s Windows Azure cloud platform, both the present offering as well as a roadmap of what’s ahead.
Windows Azure Architectural Patterns
Microsoft’s Windows Azure cloud platform is a full Platform-as-a-Service offering, and is much, MUCH more than “Hosting Version 2.0”. Yes, you could do things the way you always have, but as an architect or developer on the Windows Azure platform there are some exciting new architectural patterns that enable the next generation of software. As an architect evangelist on the Microsoft Azure ISV team, I see new patterns regularly. The key takeaway from this session is “question everything”, come and see why.
Windows Azure: what’s in it for an ISV?
Are you currently an Independent Software Vendor, or do you think you have an idea that could be the next Twitter or Facebook? Are you a startup, or would you like to be? As an architect evangelist on the Microsoft Azure ISV team, I get to help people and companies realize their dreams of becoming an ISV, or evolving to the cloud. In this session, we will cover the capabilities and architectural patterns that make the Windows Azure platform so attractive to ISVs, and how it enables possibilities (applications, services, business models) that could not have been done otherwise.
by community-syndication | Nov 12, 2010 | BizTalk Community Blogs via Syndication
Earlier this week we shipped the ASP.NET MVC 3 Release Candidate. It supports “go live” deployments, and includes a bunch of great improvements/enhancements on top of the features we enabled earlier with the ASP.NET MVC 3 beta and first preview releases.
This is another in a series of “mini-posts” I’m doing that talk about a few of the new ASP.NET MVC 3 Beta/RC features in more detail:
In today’s post I’m going to discuss a small, but useful, feature we’ve recently introduced: server-side comment support in Razor.
Why Server Side Comments?
Scenario: You are working within a view template, and want to temporarily disable some content or view code (potentially to help track down a problem, or to temporarily change the output of your site).
HTML supports client-side comments (<!– –>), which you can use to prevent a browser from parsing/running/displaying the HTML content within it. The problem with using this approach for many scenarios, though, is that the content contained within the comment is still sent down from the server to the client unnecessarily – and the server-side code within the comment will still execute on the server.
ASP.NET Web Forms supports a server-side comment syntax (<%– –%>) that you can use to completely disable content/code/controls within a page. With server-side comments, the ASP.NET Web Forms compiler completely ignore everything within the <%– –%> blocks at parse time, and removes the content completely when assembling the page (like the contents wasn’t there at all). You can learn more about this feature from an older blog post of mine here.
One question someone asked me earlier this week was “is there an equivalent way to do this with Razor?”. The answer is – yes!
Server Side Comments with Razor
Razor now allows you to wrap any code/content/region of a view within a @* comment *@ syntax (which works for both C# and VB templates). This syntax indicates that the Razor parser should ignore everything within that block and treat it like it isn’t there at all (meaning nothing is ever executed, there is no performance overhead at runtime, and nothing is sent down to the client).
For example, below I’ve wrapped some HTML content and server-code within a @* *@ block. This is equivalent to it not being there at all:
Notice above how Visual Studio (starting with this week’s ASP.NET MVC 3 RC build) now colorizes comments (by default in green) to make them more visible within the editor.
Visual Studio also now enables you to use the comment/uncomment buttons on the text editor toolbar to easily comment/un-comment a block of text/code. For example, we could select the above @* *@ comment block within the text editor, and then click the “Uncomment” toolbar button (or better yet press Ctrl+K, Ctrl+U) to have VS uncomment the region:
When we do this the editor will automatically uncomment the block for us (saving us some keystrokes):
We could then highlight another region of text/code within the editor, and then either click the “Comment” toolbar button or press Ctrl+K, Ctrl+C to apply a server-side comment:
When we do this the editor will automatically comment the block for us (saving us some keystrokes):
Summary
Server-side comments are a small, but useful, feature that can come in handy in a variety of circumstances. Razor now enables server-side comments at runtime, and Visual Studio provides nice tooling support for them at development time.
Hope this helps,
Scott
P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu
by community-syndication | Nov 12, 2010 | BizTalk Community Blogs via Syndication
Managing multiple asynchronous operations in WCF is currently very complex regardless of whether you use the existing event or Begin/End asynchronous patterns. In fact, both internal and external customers frequently ask about how to implement simple coordination of WCF operations, and even though sending multiple requests to a WCF backend is a core scenario, WCF does not provide a satisfactory solution. The amount of code needed to facilitate even simple coordination tasks is large and prone to bugs, handling errors and timeouts. Yet there are some very common communication-oriented scenarios that require managing multiple outstanding asynchronous operations:
- Execute multiple async operations in parallel and continue when they are all done, either successfully, failed, or timed out.
- Execute sequence of asynchronous operations, stopping if one of the operations fails or times out.
- Nest multiple asynchronous operations.
- Combine asynchronous operations with timers for easy polling at regular intervals.
However, regardless of the current complexity, WCF developers have to use asynchronous requests to write robust implementations, and doing that today is a difficult challenge.
During PDC’10, the C# and VB languages teams released the Visual Studio Async CTP, which aims at providing a new simplified model for doing asynchronous programming in both languages. In WCF, we have decided to adopt this model because we believe it removes the barrier to writing WCF robust asynchronous application, has the least possible learning curve from the existing CLR APM pattern, and provides a simple and consistent model for coordinating, submitting and managing multiple asynchronous WCF operations.
WCF vNext will adopt the Async model in both the client and the server side, and provide new Task-based overloads for some of the most used asynchronous APIs:
Server Side
WCF service developers will be able to define asynchronous operation contracts that return Task/Task<T>:
[ServiceContract]
public interface IServiceContract
{
[OperationContract]
Task<string> Hello(string name);
}
As you may notice, there is no need to switch OperationContract.AsyncPattern to true anymore (yeah!), or define Begin/End methods in your service contract.
In the service contract implementation, WCF service developers will be able to implement that operation contract as an async method, and create/start new tasks, etc.:
namespace WCFServiceModelSamples
{
public class HelloService : IServiceContract
{
public async Task<string> Hello(string name)
{
return await Task.Factory.StartNew(() => "hello " + name);
}
}
}
There is no need to explicitly implement any Begin/End method, IAsyncResult objects or any type of callback. Internally, WCF will add an operation invoker to the dispatcher that will be able to process Task-based operations, which will make all work transparently to the user.
Client side
The support for generating Task-based operations on the client side will be available to users who rely on proxies generated by our client generation tools (svcutil.exe or Add Service Reference), as well as to users who prefer to directly use ChannelFactory<T>.
The client proxy generation tools will generate Task-based overloads for all operations in the contract by default. This means that WCF client application developers will not need to switch any new knob in the tools to be able to use this model. But they will always be able to opt-out with the /syncOnly switch if they wish. The output of executing ’svcutil.exe /async’ will still generate Begin/End methods, as it does today. WCF users should not experience any breaking change in their code. Finally, it is worth mentioning that WCF developers will be able to generate Task-based overloads as well by using ServiceContractGenerator.
From the implementation side, the support for executing Tasks will be implemented directly in the channel, which makes the generated client proxy code look as clean as this:
public partial class HelloServiceClient : ClientBase<IServiceContract>,
IServiceContract {
public System.Threading.Tasks.Task<string> GetDataAsync(int value) {
return base.Channel.GetDataAsync(value);
}
...
}
Finally, a code snippet for a WCF client application calling asynchronously the WCF service defined above will look like the following:
namespace MyAsyncApplication
{
class AsyncClientApp
{
static void Main(string[] args)
{
string[] names = { "dan", "john", "tarae" };
PrintOutNames(names)
.ContinueWith(delegate { Console.WriteLine("Done."); });
Console.WriteLine("Hit ENTER to exit.\n");
Console.ReadLine();
}
static async Task PrintOutNames(string[] names)
{
foreach (string name in names)
{
try
{
Task<string> task = new HelloServiceClient().Hello(name);
if (task == await Task.WhenAny(task, Task.Delay(1000)))
{
Console.WriteLine(await task);
}
else Console.WriteLine("Timed out");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
}
New Task-based public APIs
Even though WCF developers will be able to add their own Task-based wrappers for existing asynchronous APIs based on the Begin/End model via Task.Factory.FromAsync, WCF will provide Task-based overloads for some of the main asynchronous public APIs. In particular, for those in the MEX and Discovery client, for consistency with the tools-generated clients:
- System.ServiceModel.Description.MetadataExchangeClient.BeginGetMetadataAsync
- System.ServiceModel.Discovery.AnnouncementClient.BeginAnnounceOnlineAsync
- System.ServiceModel.Discovery.AnnouncementClient.BeginAnnounceOfflineAsync
- System.ServiceModel.Discovery.DiscoveryClient.FindTaskAsync
- System.ServiceModel.Discovery.DiscoveryClient.ResolveTaskAsync
That’s all folks! Feedback is always encouraged. Please let us know what you think about this new programming model in WCF. Welcome to the new asynchronous programming world!
Amadeo Casas Cuadrado
Program Manager, WCF
by community-syndication | Nov 12, 2010 | BizTalk Community Blogs via Syndication
Just a little quick one for myself….
When running some data driven unit tests we were getting the below error.
Unit Test Adapter threw exception: System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
The cause of this was that we had rebuild the machines and somehow when installing office the DSN for Excel hadnt been created. On all of the other machines it had been setup fine but for some reason on my machine it hadnt been setup.
The fix was to create a DSN called Excel Files pointing to excel driversand then just rerun the unit tests.
As a reminder the test attributes for this were below:
[TestMethod][DeploymentItem(@”..\..\..\mappings.xlsx”)]
[DataSource(“System.Data.Odbc”, “Dsn=Excel Files;dbq=|DataDirectory|\\spreadsheet.xlsx”, “worksheet1$”, DataAccessMethod.Sequential)]
by community-syndication | Nov 12, 2010 | BizTalk Community Blogs via Syndication
How to get to the Device Manager in Windows 7?
If you happen to have an issue with your computer as I have right now… It keeps crashing and re-starts itself. It’s a bit frustrating. I am using Windows 7. You might want to look at your Device Manager to see if you have any issue with your Device Drivers, whether they are updated or not.
read more
by community-syndication | Nov 12, 2010 | BizTalk Community Blogs via Syndication
On Tuesday I blogged about the recent release of the ASP.NET MVC 3 RC build. You can read more about it here.
This post is a quick follow-up post that discusses a few installation issues that we’ve seen people run into – and how to fix them:
ASP.NET MVC 3 RC and C#/VB Async CTP
Two weeks ago the VS languages team released an early preview of some cool language improvements to VB and C# that we are working on for asynchronous programming. Unfortunately it isn’t possible to have both the Async CTP and the ASP.NET MVC 3 RC installed on the same machine at the same time. You instead need to choose one or the other right now – installing both will cause problems.
If you’ve already installed the Async CTP and want to install the ASP.NET MVC 3 RC, then you need to use Add/Remove Programs and uninstall the Async CTP. Once it is uninstalled, then you can safely install the ASP.NET MVC 3 RC build on your machine without problems.
If you’ve already installed both the Async CTP and ASP.NET MVC 3 RC on the same machine, then you will likely experience issues in VS with debugging (and potentially other things) not working. To fix this, go to Add/Remove Programs and uninstall both the ASP.NET MVC 3 RC build (including the VS Tools components for it) and the Async CTP. Once you’ve uninstalled both your machine will be back to a clean state and working fine. You can then choose to install either the Async CTP or ASP.NET MVC 3 RC and it will work fine.
Razor Intellisense and Resharper
ReSharper is a popular product from JetBrains that enhances Visual Studio’s intellisense and code editing features. If you have ReSharper installed and want to take advantage of the Razor intellisense support we added to the ASP.NET MVC 3 RC build, please read this blog post from JetBrains which discusses ways to use them together today.
NuPack/NuGet Schema and Feed Updates
We’ve made some schema and feed modifications to NuGet since the original preview release of it that will prevent you from updating packages that were added with the original preview build. When updating to the ASP.NET MVC 3 RC, you’ll need to delete your existing packages and re-add them to your project to account for this. You can do this by deleting the packages from disk, and then run the install-package command again.
Hope this helps,
Scott
P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu
by community-syndication | Nov 11, 2010 | BizTalk Community Blogs via Syndication
Security is an issue that must be addressed in all Web services, not just in the ones that support the WS-* protocols. This table looks at interoperating with various security policies
read more