août
21
2009

How to connect to SQL Azure

From Microsoft SQL Server Management Studio (tips from the SQL Azure — Getting Started forum, this post) :

Please be aware that SSMS is not supported with SQL Azure yet. However, you can use the following workaround for the time being:

1. Click Cancel in Connect to Server Dialog
2. Click New Query which will bring up the new connection dialog.
3. Enter your credentials. By default, you will connect to Master database. If you want to connect to specific database, click options and enter the database name. Please be aware that USE <database> is not supported.
4. Now click Connect and you will get an error "Unable to apply connection settings. The detailed error message is: ‘ANSI_NULLS’ is not a recognized SET option. "
5. Click Ok.

After this step, you should be connected to the desired database and you can start running queries.
Thanks,
Abi

Here are the information you need to enter into Microsoft SQL Server Management Studio. You will get those from

3842366844_c64803c044_o[1]

You will get this error message, just click OK

3842373284_54932c057f_o[1]

According to Stan Kitsis – MSFT (MSFT, Moderator) (link):

I'm not aware of a way to get around this message.  We are planning to enable support for SET ANSI_NULLS in the next service update so hopefully the experience will be better.
Stan


Program Manager, SQL Azure

I also tried to run aspnet_regsql.exe without any success, there are still lots of features which seems to be not supported at the moment.

juil.
10
2009

Expression Blend 3 + SketchFlow RC

Microsoft just released Expression Blend 3 + SketchFlow RC.

This time we get SketchFlow !

You might download Microsoft Expression Blend 3 + SketchFlow RC from this page.

Overview

Expression Blend 3 + SketchFlow is a visual tool for designing and prototyping desktop and web applications. You build an application by drawing shapes, drawing controls such as buttons and list boxes, making the pieces of your application respond to mouse clicks and other user input, and styling everything to look uniquely your own.

juil.
10
2009

Silverlight 3 RTM Released

Microsoft just released Silverlight 3!

You might download Microsoft® Silverlight™ 3 Tools for Visual Studio 2008 SP1 from this page.

Overview

This package is an add-on for Visual Studio 2008 SP1 to provide tooling for Microsoft Silverlight 3. It can be installed on top of either Visual Studio 2008 SP1 or Visual Web Developer 2008 Express with SP1, and it provides a Silverlight project system for developing Silverlight applications using C# or Visual Basic.
This download will install the following:

  • Silverlight 3 developer runtime
  • Silverlight 3 software development kit
  • KB967143 for Visual Studio 2008 SP1
    and/or
    KB967144 for Visual Web Developer 2008 Express with SP1
  • Silverlight 3 Tools for Visual Studio 2008 SP1
    and/or
    Silverlight 3 Tools for Visual Web Developer 2008 Express with SP1

Silverlight 3 Tools for Visual Studio 2008 SP1 includes:
  • Visual Basic and C# Project templates
  • Intellisense and code generators for XAML
  • Debugging of Silverlight applications
  • Remote debugging of Silverlight applications for Mac
  • Web reference support
  • WCF Templates
  • Team Build and command line build support
  • Support for cached transparent platform extensions
  • Support for Silverlight 3 Out-of-Browser applications
juil.
8
2009

Office 2007 templates folder

I am always loosing time searching for that information when we get an update of office templates, so I decided to make a ‘note to self’ so that I will not loose anymore time with that.

Start Word 2007 and go on Word Options, then click Advanced, File Locations:

Original location: C:\Users\{your username}\AppData\Roaming\Microsoft\Templates

In that location create a shortcut to your template folder, but keep the selected original path:

Now you should have access to your templates like this:

With this way of doing you might get multiple template folders.

juil.
3
2009

Book review - ASP.NET MVC 1.0 Quickly

I had the pleasure to read ASP.NET MVC 1.0 Quickly from another ASP.NET MVP and blogger, Maarten Balliauw published by Packt Publishing.

The book is a quick overview of 191 pages covering all the different aspects of ASP.NET MVC 1.0. It ends with three appendix, a sample application CarTrackr, ASP.NET MVC Mock Helpers and Useful links and Open Source Projects, for a total of 231 pages.

Maarten starts with an introduction about Model-View-Controller and the drivers of the new framework. Then it moves to the real overview in details of the different parts of the framework: Form, ModelBinder, Request Life Cycle, Extensibility, Model, Controller, View, Action filters, Routing, Extension, Ajax, Testing and Hosting, mixing ASP.NET with ASP.NET MVC. So all the different parts are covered.

The different code samples are straight and perfectly demonstrates each points explained.

I particularly liked the parts about the Request Life Cycle and Customizing and Extending the ASP.NET MVC framework, one of the main reason I like this framework.

Finally I appreciated that the book is short, you might read it in 2-3 evening, and goes to the essential about ASP.NET MVC.

You might read the Chapter 2 in pdf.

Well done Maarten.

juin
9
2009

Did you know that if you’re an MSDN Subscriber you can get Telerik WPF controls FREE ? : Misfit Geek

6-8-2009 4-20-55 PM

Telerik, a leading vendor of .NET UI components and tools, has a special offer for all active MSDN subscribers !!

A free Developer License for RadControls for WPF ($799 value), with community support only.

This license gives you access to all of the Telerik WPF controls for use in unlimited personal or commercial projects.

Take advantage of the offer and enjoy a powerful WPF grid, scheduler, animated 3D charts and gauges, and everything you need to build rich and visually stunning WPF line-of-business applications.

The offer is valid through July 31st, 2009. To claim your free license, log-in to your MSDN Subscriber account and look for the “Exclusive Deal from Telerik” on the MSDN “Special Offers” tab.

Did you know that if you’re an MSDN Subscriber you can get Telerik WPF controls FREE ? : Misfit Geek

Some people could not find the link on MSDN, so here it is how I did it. Login on MSDN with your credentials, move the mouse on your login name on the top, on the menu click on the Download and Product Keys, then on the tab Special Offers as on the picture. You get to the list of offers containing the Telerik One.

mai
9
2009

Updated my Live Template for NUnit in ReSharper

I tend to use a lot the Live Template of ReSharper, for example working for some time now with the WPF MVVM pattern I created a ViewModel template of such a class and use it extensively.

Today I updated the File Template I use to write my NUnit tests like this:

using NUnit.Framework;

namespace $NAMESPACE$
{
    // ReSharper disable InconsistentNaming

    [TestFixture]
    public class $CLASSNAME$
    {       
        /*
         * ... hold ...
         *
         * Arrange - Act - Assert
         */

        [Test]
        public void $FIRST_TEST_NAME$()
        {
            $END$
        }
    }

   // ReSharper restore InconsistentNaming
}

where I have the variable names defined as this:

avr.
17
2009
Tools // WPF

Memory leak with WPF resources

I am working for a couple of months now with WPF and MVVM on an a business application using .NET Framework 3.5 SP1. Lately I faced a memory leak. Not the easy kind of memory leak with events handlers which keeps objects and its element tree alive, as explained here.

No it was something else ! I searched in our code for quite some time without finding anything.

My internet research brought me to a blog post from Ramon de Klein, “Memory leak with WPF resources (in rare cases)” which stated :

When does the problem occur?
The problem occurs in the following situation:

  1. A style is defined in the application’s ResourceDictionary.
  2. The style uses a control template that uses media effects (i.e. DropShadowEffect).
  3. The media effect should be referenced using a StaticResource.

We were matching the two first points and I tried the proposed fix:

You can force the effect to be frozen by specifying “PresentationOptions:Freeze=True”, but this is not common behavior.

The workaround is simple… Just add the Freeze attribute to all the effects that you don’t plan to modify at runtime.

But that didn’t made it.

I decided then to move the style definition from the application ResourceDictionary to the MainWindowView ResourceDictionary, which was for sure a better place for it. This to avoid the first point.

This worked! And we do not have this memory leak anymore. But as always when you fix one, some other popped up! But that’s another story.

How did I came to find the blog post from Ramon de Klein ?

With a perfect timing I got an offer from Red Gate to test their latest tool still in Early Access Program: ANTS Memory Profiler 5

You might watch a two parts video here (part1) and here (part2) and read about it here. You can even download a version from their forum, check it out.

First I used ANTS Memory Profiler 5 Timeline to see that the memory wasn’t released at certain points in which it should. The red line shows the Bytes in all Heaps and should go down after each vertical line (gray, blue and red)

Same result with Process Explorer, Memory usage going up without going down.

So we got on the screen the memory leak. Next step was to identify it.

Using Memory Profiler Class List, I browsed to the class that I new should be released, and proved it wasn’t: Live Instances is 3 and Instance Diff is +2. So at that time I knew that this class was maintained by something in memory.

Watching the Memory Profiler Instance list, I could identity the different instances still in Memory and one wasn’t new, so a good candidate to look at:

Finally switching to the Memory Profiler Object Retention Graph, I could navigate up the graph to see that DropShadowEffect was maintaining a reference:

Up to my application RessourceDictionnary, as exaplained in point 1 from Ramon de Klein blog post, as you can see.

All those information gave me the opportunity to find the blog post from Ramon and led me to the solution.

This is the result of the fix I implemented, as you can see I have now only one Live Instance of the ProductViewModel class and an Instance Diff of –1. This shows that the object wasn’t retained in memory and cleaned correctly.

 

ANTS Memory Profiler 5 and Ramon de KleinMemory leak with WPF resources (in rare cases)” blog post was of great help to fix this memory leak. Thanks!

Thanks flies also to Stephen Chambers for the support with my questions on ANTS Memory Profiler 5.

Finally I would like to warmly THANKS Laurent Bugnion for his kind chats that helped a lot, as always!

avr.
17
2009

Five Ways To Build Team Trust &amp; Framework for Feedback

I am for quite some time now working on the Agile subject and tonight I read two very interesting posts that I wanted to share and keep track of.

The first one was posted by Mike Bria on InfoQ and is called Five Ways To Build Team Trust, in which advises are given to help trust form within teams.

    1. Address Issues Directly.
    2. Share Relevant Information.
    3. Follow Through on Commitments or Give Early Notice When You Can't.
    4. Say No When You Mean No.
    5. Show What You Know and What You Don't Know.

The second post, “How I learned about Feedback” is from Ola Ellnestam, Agile Coach, Systems developer, Agile Practitioner, and is an excellent report on experiences applying a “feedback framework” learned from a workshop held by Esther Derby and Diana Larsen.

Framework for feedback

Esther Derby and Diana Larsen introduced me to a ‘Framework For Giving Feedback’. It looks like this.

  • Create an opening
  • Describe the behavior or results
  • State the impact
  • Make a request

I find this framework very easy to use and powerful. So, when I’m about to give feedback in tough or new situations I try to run through the scenario in my head, creating an imaginary outcome of the conversation. This has helped me several times. Lets look at the ‘meeting issue’ again.

Enjoy

avr.
17
2009
WPF

Attending the &quot;WPF FOR LOB&quot; TRAINING TOUR in London

Next month I will attend with my colleague Robert the “WPF FOR LOB” training Tour in London (5/15 -5/16). Our flights and hotel rooms are already booked. We fly from Zurich to London Heathrow on Thursday 14 Mai arriving at 20:15 in London and I fly back to Mulhouse on Saturday evening.

We will be at the conference hotel Radisson Edwardian Heathrow Hotel, where the training take place.

Jaime Rodriquez and Karl Shifflett have been organizing a “WPF FOR LOB” to provide 2 days of free WPF training for developers.

Overview
This two day training is designed to teach developers how to create Line of Business (LOB) applications using Windows Presentation Foundation (WPF). 

  • Day One is an introduction to the WPF graphics subsystem, the tools used to build WPF applications, and the core UI services: styling, data binding, templating, layout and input-
  • The second day begins with interop (Windows Forms and Win32)  and then quickly dives into LOB topics, including building applications using the Model-View-ViewModel pattern, creating unit testable applications,  implementing data validation, and error handling. 

After completion, attendees will have a solid understanding of WPF, its advantages over other Microsoft UI platforms, and how to use the M-V-VM pattern to create great WPF LOB applications.

Detailed Agenda

  • Day One:
    • Lap Around WPF
    • WPF Tools ( Blend, Visual Studio 2008)
    • Graphics Subsystem
    • Layout
    • WPF Fundamentals and new concepts
      • Application Model
      • Dependency Properties
      • Trees (logical & visual)
      • Events
      • Threading
      • Resources
    • Controls
    • Styling
    • Templating
    • Q&A with instructors at end of day
  • Day Two:
    • WPF integration with Win32 and Windows Forms
    • Data binding
    • Introduction to Model-View-ViewModel
    • Commanding in M-V-VM
    • Views, Navigation and Transitions
    • Data Validation
    • Error handling, Model dialogs, Logging
    • Unit Testing
    • MVVM & LOB tips and tricks
    • Q&A with the instructors

Read more here.

And the best of all is that it is absolutely Free.

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect, certified Scrum Master and Founding Member.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

JetBrains Academy Member
Certified ScrumMaster
My status

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List

Laurent Kempé | Being a ReSharper Guru
May
3
2005

Being a ReSharper Guru

If you are using ReSharper from JetBrains and you have some difficulties to remember the different available shortcuts then I recommend you this Pdf file:

ReSharper 1.5 Default Keymap

[ Currently Playing : Tank - Asian Dub Foundation - Tank (05:37) ]

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect, certified Scrum Master and Founding Member.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

JetBrains Academy Member
Certified ScrumMaster
My status

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List