An April Fool’s Day MVP – MVP 2012

The 1st of April has been hillarious for me, ever since I got my first Microsoft MVP Award in 2006. Not solely due to the fact that I’ve been honoured by Microsoft by being presented with the MVP Award, but also because quite a few of my friends finds it funny to send me all types of “spoofed” emails on the day.

This year was of course no different – lots of emails (of various dubious qualities), but at the end of the day I did indeed received one particular email that’s bound to bring a smile to my face.

Yeps, I’ve been awarded the 2012 Microsoft MVP Award and I’m very pleased with it. The award is a recognition from Microsoft and irrespectively of why we do what we do for the community, it is indeed very nice to get the recognition. When you take a look at the company and quality of the MVPs out there, I feel truly humbled. Some of the industry’s biggest names are MVPs but it’s like comparing apples and flux capacitors.

So here’s to another great year of more community involvements – but first a big thank you to all of those that’s bothered to listen to me waffle on for hours on end – lets make 2012 even better, and bigger, than 2011.

 Anyways, you can find me floating around in a few places:

 Feel free to ping me if you got any questions..

oh, btw, the category is ASP.Net 🙂

Visual Studio 11 [Beta] – first impressions…

There’s been much hype…yes, much hype about the next install of Visual Studio. Every man and his dog has been complaining about the colours but from the development IDE that’s probably not the most important aspect. I’d would much rather see a 64-bit version available, but that’s another story altogether.

First off, install experience…

The download was 1.7Gb for the Ultimate edition and took me about 30-35mins on my home ADSL2+ (via Bigpond) so that alone was a huge improvement over last time we saw a release of Visual Studio. Back then, the download took me more than 24hrs (probably due to the lack of bandwidth MSFT had available).

The install was extremely easy – yes, this is a beta and things may change – however since I downloaded the Ultimate edition it should pretty much have everything enabled…

download .iso and right-click (Windows 8 Consumer Preview FINALLY has a native ISO mount capability) ->> mount.

Or you could alternatively use the ribbon above after you’ve clicked on the .iso file.

Then it’s just a matter of starting the installer..

 

It becomes pretty obvious that there’s a new design in town – gone is the sluggish and drab looking “Windows Classic” look that all previous installers have had. That the colours just so happens to be my favourite colours does help too 🙂 And it fits my desktop background and desktop theme perfectly too 🙂

 

One of the things that I like is attention to detail – the little “pellet animation” that I’ve personally come to associate with the Metro design (it’s obvious all over Windows Phone 7 and Windows 8) is a nice touch in the installer. That aside, the installation went smoothly and without a hitch (hang on, this is a beta release..why didn’t I have to try to install at least twice and add some obscure KB/Patch?? that’s not right!).

Just another quick detail – I love the finishing touch of the name that the final process has -> “ultimate_finalizer”…anyways, as can be seen below here, it was a success (if there was any doubt that is).


Once the choice of default development environment (choose C# Development Environment of course) the first thing that does indeed strike you is the UI. At first the difference was a bit distracting – probably because I wanted to soak in everything at once. I am a geek after all. But then familiarity settled in again. Much of what i’m used to seeing was there (for new features of VS11 I suggest you read through this MSDN article)

The look and feel is much less distracting than what it used to be. I’m not an UI expert but the look really does ring a bell with me very pleasantly. Content is master. A smooth grey theme is seen across the whole GUI, with very few distractions such as bright colours, taking focus away from what should be on every developers mind – productivity.

As you can see, the grey tones and the blue highlights are very soft. The contrast between sections, colours and context is really effective (again, does it follow a tried and tested/bested design paradigm? do I care? no). I spend a huge amount of time in front of a monitor each day, and I really hate having something stress my eyes and put a strain on my concentration.

Last night I spent a good 3 hours writing some code and getting used to Visual Studio 11. And even though this was in my preferred environment (eg. at home, comfortably in my own office) I didn’t come away with any kinks and I just about as productive as normal.

Enough of the colours (or lack thereof) though..

I noticed that there’s quite a few extensions shipped OOTB with this beta – they may not be shipped when it goes into production, but in all honesty I don’t see why the teams should bother removing any of them.

  • ASP.Net MVC 3 template packages
  • ASP.Net MVC 4 template packages
  • ASP.Net Web Pages 2 template packages
  • ASP.Net Web Pages template packages
  • ASP.Net WebForms template packages
  • Concurrency Visualizer
  • IntelliTrace
  • Nuget Packet Manager
  • PreEmptive Analytics Aggregator Visualizer
  • Visual Studio PerfWatson
  • VsGraphicsDebuggerPkg
  • Web Tooling Extensions

I’m particularly pleased to see Nuget Packet Manager be shipped OOTB.

Secondly – another aspect that I’ve never really understood not being included straight away – Team Foundation Server support is now also OOTB. Looks like it’ll be there from the get go as well. And it works just fine with TFS 2010.

Tried to connect to LIDNUG’s instance on TFSPreview.com and it worked a treat. One other thing, which I admittedly haven’t paid attention to in VS2010, was this little tid bit.

Yeps, in the lower right corner of the “Start Page” there’s an option set available. the one which surprised me was “Close page after project load” which is checked by default. No need to clutter your project screens with the start page. Excellent.

One of the applications that I’ve been using quite frequently of late is Visual Studio LightSwitch. Which also seems to be tagged into the Ultimate version of Visual Studio 11.

Now getting started in Visual Studio has frequently been a chore – especially the “New Project” dialogue, so I was keen to see how fast it loaded. And it was lightning fast to be honest. Half expected it to take yonks to load, but nopes, came up straight away.

Anyways, it’s time to crunch some code – will blog another one once I’ve played around with it some more. All in all, a definite improvement.

 

 

ASP.Net MVC 4 hits beta & Scott Hanselman’s letter

If you, like me, have become a big fan of ASP.Net MVC then you’ll be happy to know that MVC 4 has just hit the beta.

Ever since MVC 4 hit CTP I’ve been hanging out for the closing date for the final release…it’s not here just yet, but at least it’s hit beta.

Obviously the support for mobile devices and HTML5 has been on the forefront of the teams delivery list and one of the features that enables this across a range of clients (that’s browsers, mobile devies etc) is the ASP.Net Web API.

With this release it’s also obvious that a lot of work has gone into learning material as it’s available from the get-go.

Of course, web forms (or classic ASP.Net) isn’t dead…as a web developer there’s so much innovation happening out there that it’s almost impossible to keep track of everything.

Scott Hanselman, who’s probably one of the most known (next after Scott Guthrie of course) ASP.Net team members has this to say..

Letter from Scott Hanselman

It’s an interesting time to be a web developer. HTML5, CSS3, and JavaScript, and the excitement around them, are moving the web forward faster than ever. As the web evolves, the folks at the web team here at Microsoft are evolving with it. The next version of Visual Studio will include lots of new features for web developers. The HTML, CSS, and JavaScript editors have all been gone over with a fine-toothed comb with a clear focus on your everyday workflow. Little things like IntelliSense for CSS vendor-specific prefixes, a hex-code aware color picker, and snippets that expand into the features you use every day all work together with the promise to smooth your way.

ASP.NET Web Forms offer the comfortable control-based model with server-side events, ASP.NET MVC gives you an environment that promotes unit testing and separation of concerns, and ASP.NET web pages combine all the power of the lightweight and expressive Razor syntax with the convenience of inline scripting. ASP.NET itself is at the core; it’s the system that makes ASP.NET Web Forms, ASP.NET MVC and ASP.NET web pages possible. Each can create modern and powerful HTML5 sites and each use all the power of today’s modern JavaScript frameworks like jQuery, Knockout, Backbone, and much more. New frameworks like SignalR build directly on top of ASP.NET and make possible scalable real-time applications with cutting edge tech like Web Sockets.

Don’t think of ASP.NET as an island. It’s a citizen of the larger community. More and more of ASP.NET is open source, and we push hard every day to stay open and be open. We want to make ASP.NET more pluggable, more open, more fun. We’ve got big things planned – some that will surprise you. I hope you’ll join the conversation and the community.

Read about the next version of ASP.NET at http://asp.net/vnext.

Scott Hanselman

Being and ASP.Net MVP it’s easy for me to get excited about what’s coming up…oh boy!!!

Scott Guthrie’s Letter To You – “I have not left .Net for Azure”

We’ve heard it before – Scott Guthrie HAS NOT LEFT the ASP.Net team – but the rumours are still floating around. During Scott’s quarterly Q&A session for LIDNUG he’s answered the question many, many times already.

But to cement the rumours, here’s a letter from Scott Guthrie to you (published February, 2012 MSDN Flash Magazine):

Letter from Scott Guthrie
CVP, Azure Application Platform

.NET and Windows Azure Progress

There’s a lot of great work going on in the .NET and Windows Azure space, and the months ahead are going to be exciting ones for developers.

A few people have sent me email recently about whether I had “left .NET for Azure.” On the contrary – I’m still very involved in .NET, and the teams that build the server pieces of .NET (including ASP.NET, WCF, WF, and the corresponding Visual Studio teams) work for me. Making .NET applications in the cloud be amazing is a huge part of the Windows Azure promise, and one of the reasons I’ve recently also been working on Windows Azure. This past fall we began rolling out some major improvements (visit windowsazure.com to learn about them). You will see even more significant updates and features in Windows Azure in the months ahead.

You are also going to be able to soon take advantage of some great improvements that will ship with Visual Studio 11 and the .NET 4.5 versions of ASP.NET, WCF, WF – as well as with the new releases of ASP.NET MVC and the Entity Framework (which will support both .NET 4 and .NET 4.5). These releases are packed with great new features that will significantly improve productivity as well as enable some fantastic new scenarios – including mobile web, web sockets, web APIs, HTML5, database migrations, integrated async language support, and much, much more. These improvements are going to enable you to build really amazing applications.

In addition to delivering great products, we are also increasing our commitment and support of open source and the community. In December, we announced that we were open sourcing the Windows Azure SDKs on GitHub. We are also releasing new features of ASP.NET including NuGet, SignalR and Web API under an open source license. You’ll see us invest even more in open source in the months ahead.

I’m really looking forward to 2012 – it is going to bring a bunch of improvements for developers, and enable you to build better applications than ever before.

Scott Guthrie

This should surely put a lid on the doubts that ASP.Net is dissapearing, that Scott has left the team etc etc…

Exciting times ahead!!

 

PSSUG: Dark art of performance tuning scripts from Peter Ward

Hey,

Earlier in January 2012 saw Peter Ward (WardyIT, SQL MVP, Awesome Guy) present for the Perth SQL Server User Group (PSSUG) for a full house. One of the requests was to get the scripts that Peter had created made available to all the members that attended.

So, here it is, you can find the scripts.

The T-SQL scripts include the following functions, which are obviously very handy when doing performance tuning on SQL Server:

  • Find what version of SQL Server you are running
  • Get an overview of what hardware you are running
  • Get a snapshot of the memory allocation
  • Check the SQL Server configurations
  • Get info about each database file
  • Check the Waits stats
  • Signal waits for CPU pressure
  • Check the Page Life Expectancy
  • Check the Buffer cache hit ration for default instance
  • Find high value for CACHESTORE_SQLCP (for ad-hoc query plans)
  • Find ad-hoc queries that are bloating the plan

I want to thank Peter for an extremely informative session and well presented topic (as usual!).

Download the scripts here (.txt file):
PSSUG – Peter Ward SQL Server Performance Tuning Scripts

Next up, scalability from thousands to millions at LIDNUG

Just a quick heads up to all of you that the next event at LIDNUG is happening on the 31st of January (10AM PT).

This time around it’s presented by no other than Omar Al Zabir and he’s going to take us through how he sorted out scaling a web site from thousands of hits to millions of hits.

Learn how I have scaled an ASP.NET AJAX Web 2.0 startup and an high volume enterprise webapp to millions of users. You will learn some advance tips like optimizing asp.net cookies, fine tuning asp.net membership stored procedures, implementing CDN, distributing content for faster parallel load, tuning asp.net pipeline for maximum performance out of commodity hardware.

 About the Presenter:

Omar is the Chief Architect of Software-As-A-Service (SaaS) Platform in BT, living in London, UK. As the name suggests, I get to do the cool stuffs at BT.

He was born in Dhaka, Bangladesh. Did his B.Sc. in Computer Science. When he was 9, Omar won the Best Competitor Award in the first Nationwide Computer Programming Contest. Media made his life complicated for a year. Omar’s first startup, when he was 15, was quite successful, where he built 4 multimedia titles and sold in a CD. There was a fun app for pre-school kids to learn alphabets, rhymes, puzzles; one app for teenagers to learn Chemistry with animations, 3D illustrations and a sci-fi style user interface and one app for learning Astronomy with hundreds of videos and clips from Nasa, and one for Tourism in Bangladesh with interactive maps, nearly 400 popular attractions’ photo and description. Omar had built an HTML rendering engine that could render styled text, inline image and video, using Visual Basic 5. If you know VB 5, you would recognize that as a noble-prize candidate effort.

Omar has been awarded the Microsoft Most Valuable Professional award 6 times in a row.

Blog: http://www.omaralzabir.com

Click here to register for this event

PHUKRCBDMWNJ

Simple way to deserialize DateTime strings

I recently came across a small problem when i was debugging an application. The app relied on a REST service and returned an XML result to me. An addition to the returned XML was that of a “start_date” element. Since we initially didn’t need to actually “do” anything with the “start_date” element, it was simply written out in pure text.

Later on, it suddenly became obvious that we needed to actually “do” something with it, so we needed to deserialize the element returned, and convert it into a DateTime object.

Now that’s not possible to do normally with the returned element..

1: <elements>
2: <otherelement />
3: …..
4: <start_date>2012-01-16 10:00:00</start_date>
5: …..
6: </elements>
 
The opposing definition for the “start_date” element – especially since the format was a bit off as well (US format).
 
1: [XmlElement(“start_date”)]
2: public stringStartDateString { get; set; }The solution is to have another property listed in
 
the deserialization class, which would take care of the conversion for us.
 
1: [XmlIgnore]
2: public DateTime StartDate
3: {
4: get { return DateTime.Parse(StartDateString, CultureInfo.InvariantCulture); }
5: }
First and foremost you decorate the “StartDate” property with [XmlIgnore] so that it doesn’t get deserialized – then it’s as simple as referencing the “StartDate” property as opposed to the “start_date” property when dealing with it.

SharePoint 2010 – ConnectionTimeout issues from WFE to Profile DB

Often (at least when working with SharePoint) you can come across something that just stumps your style and leave you wishing the bad man will go away. I’ve just had such a problem and of course figured I’d project my issues onto you.

Problem – getting this evil error screen in SharePoint 2010.

Coupled with a “ConnectionTimeout” error in the ULS and Event log…

PowerShell_ISE.exe | Database | EventID 880i
– System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding

– at Microsoft.Office.Server.Data.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock) 

– SqlError: ‘Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.’    Source: ‘.Net SqlClient Data Provider’ Number: -2 State: 0 Class: 11 Procedure: ” LineNumber: 0 Server: ‘xxx.xxx.xx.xx’

– ConnectionString: ‘Data Source=xxx.xxx.xx.xx;Initial Catalog=xxx_xxx_profileDb_xxx;Integrated Security=True;Enlist=False;Asynchronous Processing=False;Connect Timeout=15’    ConnectionState: Closed ConnectionTimeout: 15

– ProfileEnumerator.PopulateQueue() Exception: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.   

Scenario:

Multi-server environment (WFE, App/CA, SQL)…
Multi-domain (Claims) environment, using ADFS and local ADDS….

The DMZ is split into (currently, and yes, we are moving SQL into a third zone) 2 zones…

The problem we were seeing was “ConnectionTimeout” errors from the WFE in Zone 1, to the Profile DB (User Profile Service/sync) in Zone 2 each time we were attempting to retrieve a list of profiles via the UserProfileManager.

In order to see what was causing this (obviously we were seeing the error in the ULS and in the Event logs, but we couldn’t see what exactly was causing it) we had to manually retrieve the profiles..the choice was powershell of course.

[void][System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.Office.Server”)
[void][System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.Office.Server.UserProfiles”)
[void][System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)

$site = new-object Microsoft.SharePoint.SPSite(“https://xxx.xxxx.com“);
$ServiceContext = [Microsoft.SharePoint.SPServiceContext]::GetContext($site);
$ProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext)
try {
$AllProfiles = $ProfileManager.GetEnumerator()

If (!($?)) {Throw ” – Facepalm!”}

foreach($profile in $AllProfiles)
{
    $DisplayName = $profile.DisplayName
    $AccountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value
    $workEmail = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::workEmail].Value
    write-host $DisplayName, “;”, $AccountName, “;” , $workEmail, “;”
}

write-host “Finished.”
}
catch {
    Write-Warning ” – $($_.Exception.Message)”
    throw “more facepalm!”

}
$site.Dispose()

Ran this from the WFE and voila – we got the ConnectionTimeout error here as well.

Next step was for us to capture the network packages going across the network, because a simple powershell script which just so happen query the same database that the UserProfileManager was connecting to, resulted in a successful query, bringing back the profiles that we were looking for. Ok, so it’s not a port blocked causing this.

After talking to a bright network engineer/architect, we were asked to run WireShark on the WFE and capture the traffic. We did, and the engineer was nice enough to read through the massive lump of data that this had generated. Breaking down the traffic made the engineer see that we had a lot of reverse DNS lookup requests simply not being responded to. Ok, that made sense, because the DNS first off all doesn’t have it configured (internet facing DMZ w/ADDS + DNS) and the “broadcast” from the WFE in order to find the SQL Server (that was the ConnectionTimeout btw) would have been blocked by firewall so the SQL Server would never have seen the request…so, hence…ConnectionTimeout.

A simple way to fix this (it’s not ideal of course, but without getting the reverse DNS lookup setup there really isn’t much choice. Reverse DNS Lookup has it’s own security implications that for this scenario really isn’t ideal) is to add the SQL Server details into the hosts file on the WFE server.

Naturally, once the 3rd zone is created and the SQL Server moved into that zone, this “fix” has to be done for both the WFE and the CA/App server.

LIDNUG: Scott Guthrie returns for 9th Q&A – Oct 26, 9AM

That’s right folks – Scott Guthrie is back for his 9th installment – he’s been absent from the scene for quite a while now. Hell, his last blog post was somewhere in September and then he went phufff.

But he’s back and we currently have 600+ registrations for the Q&A session, which Scott has normally held every quarter (but obviously with his new role…yes, what does his new role actually mean???…he’s been rather busy and have unfortunately had to postphone this session). But all good things come to those who wait – and it really doesn’t get much better than Scott Guthrie!

 

 

 

MSFT TechNet Live! Webcasts – Private Cloud with Jeff Alexander

Microsoft Australia’s DPE team has organised a series of technical webcasts, starting on the 28th of October, presented by IT Pro Evangelist Jeff Alexander.

These sessions are open to all and given Jeff’s incredible skills i’m sure it’s going to be interesting. They’ll run at lunch time AEST.

Here’s a summary of the 4 webcasts that Jeff will be holding:

Title: Delivering the Private Cloud with Microsoft Technologies
Date: Friday. 28th of October 2011 11:00am – 12:15PM (AEDT)

Title: System Center Virtual Machine Manager 2012: What’s in it, and how it enables building the Private Cloud
Date: Friday, 11th of November 2011 11:00am – 12:15PM (AEDT)

Title: Cloud Management with System Center App Controller 2012
Date: Friday, 25th of November 2011 11:00am – 12:15PM (AEDT)

Title: System Center Operations Manager 2012: Technical Overview
Date: Friday, 9th of December 2011 11:00am – 12:15PM (AEDT)

You can get more details on Jeff’s blog and also find the registration links there.