Starting a new Chapter in the Career of Mike Huguet

A couple of months ago an opportunity unexpectedly made its way into my life that would offer something different for my career.  At first I ignored it, but after a while I started thinking about the possibilities before me.  There were a couple of job openings at this “little” company, which you may have heard of before, Microsoft, that intrigued me.  I began asking myself, “Self, would you ever leave Sparkhound and if you would what would the job have to be like.”  Well, I wasn’t exactly sure, but this opportunity definitely was a possibility.  My wife and I discussed it and decided to just roll the dice and see what happens.  It is a bitter sweet moment, but I am excited to say that two months later the opportunity has become a reality and I have accepted a position with Microsoft.  I will be starting my new role as a .NET Premier Field Engineer (PFE) on October 24th.

I still absolutely love Sparkhound and will be a Sparky for life.  In fact, if things don’t work out with Microsoft, I will be on the phone with Kimmel, Noah, Mike, or Shawn asking to rejoin the team.  I’ve been a Sparky for many years now and I have helped this company grow from 20 to where it is today (not at all just me of course).  I’ve faced many wonderful and challenging days there and have grown with the company.  I’m proud of what the company has become and where it is striving to be.  I have made many lifelong friendships there so my ties won’t be going away.  I will continue to be involved in the technical community with user groups, but may have to take a breather from time to time for travel purposes.  It’s in my blood!

So what is this new job?  Well, the PFE role is part of the Premier Services team at Microsoft and is responsible for having the most advanced knowledge in a product and technology at MS, level 400.  There are only a couple of roles at MS that are expected to have this depth of knowledge and two of them are the actual product team members and the premier field engineers.  When the premier customers get in a jam and are having issues with the mission critical applications in the production setting and can’t figure them out I will help them.  I will be building and giving training workshops to customers, performing code and architectural reviews, as well creating tools, code examples, and best practice documentation.  There will be lot of training and travelling for the first year, but I will be based out of Baton Rouge.

I am looking forward to an awesome adventure with my new employer, Microsoft, and the family is ready to start another chapter in our life.

Research for the Week-Memory Management Part 1

Do you know what happens when you create a new instance of a class?  Why do we need a value type and a reference type?  Do you know what is meant when the .NET framework is referred to as a “managed” platform?  What is managed versus unmanaged code?  Why do we need a .NET runtime?  What is a memory leak; is that like an oil leak?  All of these are questions that you should be able to answer as a Microsoft developer.  If you can’t answer them all, then keep reading as the next series of research blogs that I will publish are for you (or you can just read because you want to be smarter).

I know too many developers that have jumped right into developing fancy user interface applications and don’t know much about the development platform in which they have chosen.  Why do we do this?  Most of us like to get some gratification out of accomplishing something visually.  GUI driven applications allow us to show off our work very easily.  Now that you can write a hello world app in XAML, HTML 5, jQuery, ASP.NET, WinForms, SharePoint, etc, let’s learn some more about our development platform shall we? 

This is the start to a series of blogs that will provoke and guide you in gaining more depth of knowledge in the fundamentals of the .NET platform with a focus on memory management and the .NET processing and execution models.

One could spend weeks trying to fully understand memory management within Windows, IIS, and the .NET runtime, but unless it is a requirement of your job it is only important to focus on level 100 for now.  The goal, however, would be to at least get to a 200 level and the ideal scenario would be for senior developers and architects to understand it at a 300 level, especially if your code has any interactions with COM objects and the Windows Native API’s.  In future research blogs we will dive deeper into certain areas of memory management, but the focus of this week is to get some of the basics down including those listed below.  Look to learn about these objectives in your readings.

  • Understand the purpose of a “managed” framework
  • Understand the term “native”
  • Understand what an AppDomain is and why it is important
  • Understand what Just-in-time compilation means
  • Understand how .NET code executes in a windows runtime environment
  • Understand the IIS 7 (7.5) Process Model (focus on ASP.NET integration)

 

Reference Resources

  1. .NET Framework Conceptual Overview - http://msdn.microsoft.com/en-us/library/zw4w595w(v=VS.100).aspx
  2. Common Language Runtime - http://msdn.microsoft.com/en-us/library/8bs2ecf4(v=VS.100).aspx
  3. Managed Execution Process - http://msdn.microsoft.com/en-us/library/k5532s8a.aspx
  4. Application Domains - http://msdn.microsoft.com/en-us/library/2bh4z9hs.aspx
  5. Threads, Process, and AppDomains - http://www.codeproject.com/KB/threads/IPC.aspx
  6. Research for the Week – How IIS Works - http://geekswithblogs.net/mikehuguet/archive/2011/09/12/146839.aspx
Technorati Tags: ,

Research for the Week–How IIS Works

In the world of custom web application development a critical component of our success is the hosting environment and services.  We can choose to deploy our web applications using 3rd party hosting providers such as GoDaddy.com, Rackspace, DiscountASP.NET, or another provider, or we can choose to deploy to on premise servers either virtual or physical.  In either case the web application must be serviced up to consumers by a web server software such as Internet Information Service (IIS), which is included with the Windows Server operating system.  A lot of developers and architects tend to treat IIS as a black box and do not understand how it functions.  IIS has evolved heavily over the past few years and has added a lot of native features that support and enhance ASP.NET application so it is important to understand at least the basics of how it works and what it has to offer in the way of options and additional features.  The worst thing to have happen (and what generally happens) is that issues are occurring in the production environment that require a crash course in IIS and the inner workings of ASP.NET. 

I challenge you to learn more about IIS, specifically IIS 7 and 7.5 and any other version that you have in your environment.  You can start by going to the IIS Learning Center, http://learn.iis.net.  For IIS 7 (7.5), which is included with Windows 2008 Server, you can read more about it by reading Introduction to IIS 7 Architecture, http://learn.iis.net/page.aspx/101/introduction-to-iis-7-architecture.  You can also download a developer optimized version of IIS 7.5 (included in Windows 2008 Server R2), http://www.microsoft.com/download/en/details.aspx?id=1038, to assist you in your learning, troubleshooting, and general development procedures.  This IIS 7.5 Express tool even allows you to simulate HTTPS, which was very difficult in the past on developer workstations.  Happy researching!

Technorati Tags: ,,

Upcoming Speaking Schedule for 2011 Q2

I have stepped it up a notch and am speaking at numerous user groups and technical conferences in the South East in the coming months.  These include .NET & SharePoint user groups as well as SQL Saturday and SharePoint Saturday all day conferences.  I will also be submitting to a couple of more regional events that I’m considering including Houston TechFest.  If you are in the area, I’d love to have you come by to check out these events.  Also, if you are interested in having me present at your event, you can review my current topics for 2011 and see my bio for details on contacting me.

Title Event Location Date/Time
Becoming an Effective Content Owner BCBSLA Internal SharePoint User Group Blue Cross Blue Shield of LA 4/25/2011
Establishing a Workflow Strategy for SharePoint Houston SharePoint Saturday Norris Conference Center in Downtown Houston 5/7/2011
The Power of ASP.NET 4.0 Dynamic Data Shreveport .NET User Group CoHabitat Shreveport 5/17/2011
The Power of ASP.NET 4.0 Dynamic Data Pensacola SQL Saturday Pensacola State College 6/4/2011 8:30 AM
Leveraging Open XML to Create More Dynamic Docs Pensacola SQL Saturday Pensacola State College 6/4/2011 11:00 AM
Leveraging Open XML to Create More Dynamic Docs Acadiana .NET User Group LEDA campus 6/22/2011
TBD AITP Meeting TBD 7/?/2011

Silverlight Error - “Failed to create a system.double from text ‘xx’”

I encountered the error “Failed to create a system.double from text ‘50’” when trying to develop a SketchFlow project.  After doing some digging I found that it was just that I had a space after my number “50.”  After removing the space, SketchFlow was able to load the page.

Technorati Tags: ,,

SketchFlow Build Error - “The Name ‘InitializeComponent’ does not exist in the current context”

This is my first real go round with Expression Blend and SketchFlow and it is taking quite a while to get used to it.  After several iterations of names and screen dragging, dropping in the SketchFlow Map, and adding a few elements to some screens, I decided to try and run my recently created Silverlight SketchFlow project.  To my surprise I received error message and a broken build.  How could I get a build break if I didn’t even write any code?  Man, maybe I should stick to Visual Studio.  My co-workers would love this!

 image

I found a forum entry that sent me in the right direction.  It seems that after renaming a few times the designer gets confused and does not rename all of the components as it should. 

Here is my XAML:

image

and my code behind:

image

Notice that the x:Class entry and the code behind don’t match.  To resolve this all that I did was modify the x:Class entry to EndOfYearScreens.End_of_Year_Splash and it worked.  Let’s hope that this never happens to a Designer as they may have to get into the code behind.  AHH!  Hopefully, I can get this prototype out soon without anymore issues like this.

Technorati Tags: ,,

Visual Studio 2010 Type or namespace ‘xyz’ does not exist in…

It pains me to write this post as I feel like an idiot for having wasted my time on this “problem.”  Hopefully in posting this, I can keep some other poor lost soul working at 4 AM in the morning from spending wasteful minutes scratching his head and getting frustrated.  The Visual Studio designer will work fine in resolving namespaces, but when you build you will get the “Type or namespace ‘xyz’ does not exist error.  If you see this error please take a look at your Errors List window and ensure that you have the “Warnings” option enabled.  It is very likely that you will see that there is a missing dependent reference. 

Technorati Tags:

Converting the Silverlight Business Application Template to use Windows Authentication

For my first “real” attempt at creating a business application using Silverlight I decided to use WCF RIA Services, Silverlight 4.0, and Visual Studio.NET 2010.  What easier way to get started than through a template provided by VS.NET 2010, right?  Well, in its effort to make it easier it also create some headaches.  Sometimes abstraction can add a learning curve as well.  In this case it created some headache for me on this project.  As an IT consultant for small to enterprise level business most of the usage of Silverlight will be in an Intranet zone and require Windows Integrated security where authentication and even authorization is centrally managed in Active Directory. 

The Business Application Template generates XAML, services, and other code to support Forms Authentication and an Extranet scenario out-of-the-box.  This is all great, but I now need to convert it to Windows Authentication.  I ventured down what I thought was a simple path by following directions included as comments in the generated code.  I made the switch in the App.xaml.cs file as depicted below. 

   1: public App()
   2: {
   3:     InitializeComponent();
   4:  
   5:     // Create a WebContext and add it to the ApplicationLifetimeObjects
   6:     // collection.  This will then be available as WebContext.Current.
   7:     WebContext webContext = new WebContext();
   8:     //webContext.Authentication = new FormsAuthentication();
   9:     webContext.Authentication = new WindowsAuthentication();
  10:     this.ApplicationLifetimeObjects.Add(webContext);
  11: }

I changed the web.config file to have it use Windows authentication and I removed the Profile section.

   1: <authentication mode="Windows">
   2:   <!--<forms name=".BusinessApplication1_ASPXAUTH" />-->
   3: </authentication>

I ripped out all of the Login and Membership related XAML.  Once I did all of this and start navigating and customizing the app I get a big fat error.  WHAT?

image

InvalidDataContractException, A profile property does not exist for FriendlyName.  I just removed all of the profile information why is this coming up?  After doing some digging the implementation of AuthenticationBase<T> will iterate through each property in the User class unless there is a certain attribute property setting and try and pull it from the ASP.NET profile database using the membership provider.  Here is what I found as part of the description when looking at it through RedGate Reflector,

By default, this domain service relies on the ASP.NET providers for Membership, Roles, and Profile and will reflect the customizations made in each.

Hmm, so how do I keep it from attempting to query the non-existent Profile.  If you look at the code in the User class (see below).  You will notice that it describes how to add a property that can be part of the profile, but it does not tell you how to keep it from being a part of it.  Okay, so now what?  I guess that means more digging.  After looking through the Book Club demo from Nikhil Kothari I discovered it.

/// <summary>
/// Class containing information about the authenticated user.
/// </summary>
public partial class User : UserBase
{
    //// NOTE: Profile properties can be added for use in Silverlight application.
    //// To enable profiles, edit the appropriate section of web.config file.
    ////
    //// public string MyProfileProperty { get; set; }
 
    /// <summary>
    /// Gets and sets the friendly name of the user.
    /// </summary>        
    public string FriendlyName { get; set; }
 
}

Here is how you do it.  You have to add the ProfileUsage attribute on your property with the IsExcluded property set to true.  I discovered this by looking at a demo from.

[ProfileUsage(IsExcluded = true)]

Details can be found on MSDN for its usage.  Here is a quote from the MSDN documentation.

This attribute is used by the AuthenticationBase<T> to determine how it should read from or write to the ASP.NET profile that backs the data. If a property with the same name exists in the profile, you do not need to use this attribute. If a property is not in the profile, you should set the IsExcluded property to true. If a property has a different name than the profile value that backs it, you should set the Alias property to the name of the backing value in the profile. The attribute can be used with user entities extending UserBase.

After applying the attribute, then you are ready to go.  If you want to adding properties to the User class and want to set properties, the best place that I could find is in the AuthenticationService implementation and in an override of the GetAuthenticatedUser() method.

protected override User GetAuthenticatedUser(System.Security.Principal.IPrincipal principal)
{
    User currentUser = base.GetAuthenticatedUser(principal);
 
    //TODO: Add your logic to collect data and set properties on the User class.
 
    return currentUser;
}

Hopefully this will aid you in your efforts of learning RIA services and SilverLight.  Good luck!

Technorati Tags: ,,,

Commerce Server 2009 Order Server Deserialization Error

During the deployment testing of an integration component with Commerce Server 2009’s Order Service I encountered the following error at a client site "Column requires a valid DataType."  It was occuring right at the point when deserializing the dataset from the GetPurchaseOrderAsDataSet() call.  We did not encounter this problem at all on any of the workstations.  The call stack was essentially of no help.  After some usage of FileMon and a few other diagnostics tools it struck me that maybe there was some crazy framework reflection work going on behind the scenes and it was attempting to load a soft dependency during the deserialization.  After thinking about it, I realized that it must depend on some of the Commerce Server types.  I installed the Order Management client tool that comes with Commerce Server and it all went away.  The client was fine with installing this on the production integration server so we left it at that.  I am sure that you could find a way to minimize what is necessary for deployment, but this is how we decided to quickly resolve the issue.  Voila, we’re all fixed!

Getting a List of a User’s SharePoint Groups

I found it very odd that this was not available when doing some search engine queries.  My requirement was to take in an AD user name and query SharePoint 2010 to determine the SharePoint groups in which the account belongs.  The code was to run from within a RIA Authentication Service, which is code run on a server and is not likely on the SharePoint server.  This code will also work with SharePoint 2007 (WSS 3.0 and MOSS 2007).  You will need to add a Web Reference to http(s)://<spservername>/_vti_bin/usergroup.asmx and name it SharePointUserGroupService.  Voila, you have your list of SharePoint groups for a user.  Maybe in the next version of the SharePoint Client Object Models (SCOM) this will be included.  It does required LINQ support (.NET 3.5 or greater) where this code is run (not necessarily on the server).

   1: private string[] GetRoles(string userName)
   2: {
   3:     UserGroup userGroupService = new UserGroup();
   4:     userGroupService.UseDefaultCredentials = true;
   5:     XmlNode xNode = userGroupService.GetGroupCollectionFromUser(userName);
   6:  
   7:     XElement groupXml = XElement.Parse(xNode.OuterXml);
   8:  
   9:     XNamespace ns = groupXml.Name.Namespace;
  10:  
  11:     var item = from xml in groupXml.Elements(ns + "Groups").Elements(ns + "Group")
  12:                let GroupName = (string)xml.Attribute("Name")
  13:                select GroupName; 
  14:  
  15:     return item.ToArray();
  16:  
  17: }

SharePoint Planning/Design Worksheet Links

I ran across a blog entry with a consolidated list of links to the SharePoint 2007 planning worksheets.  These are good starting points for your discovery, analysis, and design and are provided by Microsoft.  I would suggest tweaking them to meet your organizational needs.  http://itfootprint.wordpress.com/2007/10/05/sharepoint-planning-worksheets-in-one-place/

TechNet provides a consolidated list of planning worksheets for SharePoint 2010.  http://technet.microsoft.com/en-us/library/cc262451.aspx 

Technorati Tags: ,,

SharePoint Excel Services 2007 is Exciting, HUH?

Over the past three plus years that I have been working with SharePoint, I have never had the pleasure of giving an Excel Services presentation to a client.  Well, thanks to our awesome sales team this past week I was able to do that very thing.  I have been a part of some Excel Services implementations, but they were really focused on trying to create a “poor man’s” business intelligence solution with use Excel Services and Excel on top of an Analysis Services OLAP.  Of course, this was prior to the announcement of rolling in Performance Point to SharePoint Enterprise.  My experiences with using Excel Services as a BI solution somewhat skewed my opinion of the product towards the negative.  After this experience, I can say that I am really beginning to understand more of the benefit of the current and the future MS Office Services offerings.  The looks on the faces of the ten business users from various groups were priceless.  A lot of them just stared in awe and when they started asking question, they almost didn’t want to stop.  This almost reminded me of the reason that I got into this business, to get a rush from seeing the customer satisfied and praising you as if I had performed some sort of a miracle.  It was a great feeling.

I gathered a bit of information through emails with the client’s business units and prepared for my presentation.  There was not much out of the ordinary.  The two business units were both working directly with spreadsheets, compiling data for periodic reporting and sending them around through emails.  There was mention of pulling data from several of their internal systems and present them in pivot tables and charts.  It sounded like there were many different target audiences of this data.  I was able to dig up an old slide deck from the Microsoft Office team.  Here is what it has listed as the benefits:

  • Incorporate spreadsheets in portals and dashboards
  • Eliminate “multiple versions of the truth” caused by distributing copies of spreadsheets
  • Control access to spreadsheets for regulatory concerns or to protect proprietary information
  • Leverage servers to offload long-running calculations from desktop machines
  • Reuse logic & business models built in Excel in applications written in other languages without having to re-code the logic/business models

It turns out that each one of these is applicable to this client’s situation.  As we dove deeper into their current usages of Excel, I was able to uncover that they have formulas in spreadsheets that are passed around from spreadsheet to spreadsheet.  It was also discovered that they are dealing with stale data quite often and feel the pains of doing so.  What really made them excited was the ability to create dashboards allowing them to create different perspective levels of their data.  I was able to review some of their spreadsheets and determined they could easily be presented to their target executive and senior management audiences in meaningful perspectives.  What happens today is that they send these big spreadsheets to this audience and they end up just asking the business unit for the information anyway.  They get information overload having too many details and it just makes the business unit do double the work.  Another exciting feature for them was the ability to pass parameters from SharePoint to a named area.  There is a rate quote spreadsheet that they use today that would be a great fit for this feature.  They could expose it to their users from Excel Services through a web part page or just a link to the viewer. 

Other good things may come out of the conversations during the presentation, such as IT working with the business unit to allow for more real-time data integration.  In one case the business unit was taking a CSV generated by a nightly SSRS report, converting it into an Excel file, and creating pivot tables off of the data.  IT mentioned that all of the logic for flattening out the data and performing the calculations was performed in the report.  They seemed more than willing to expose a stored procedure in which the business unit could use as a data source for a spreadsheet.  While this is a much better solution than what they have today, I stressed that it is the first step that they should be taking to move to a more business intelligent environment.  This does not mean that they need to create an OLAP, but it does mean that they need to aggregate their data from their mainframe and other operational systems into a reporting warehouse database(s).  This will allow the business users to have more flexibility in querying their data so as to have better insight into their business.

I will be following up with the client after my vacation to see how things are going, but I suspect that they will be reaping some benefits in the very near future.

Technorati Tags: ,

Baton Rouge .NET User Group Getting Some Press

After the second installment of our Speaker Idol format, I was asked by INETA to write an article for the January newsletter targeting other user group leaders.  It came out great.  The article describes the event format and some of our lessons learned.  You can view the article at http://ineta.org/newsletters/2010_01.htm#CommunityEventWrapup.  There is a lovely mug shot.  That serves me right for not having a more professional picture ready and had to get someone to take a picture in the office with their iPhone.  Thanks to Jay Smith for suggesting the article idea to INETA.

Recently we had a large technology service provider, IEM, announce that it was moving its headquarters from Baton Rouge to North Carolina.  You can read about the articles from the Greater Baton Rouge Business Report:

http://www.businessreport.com/news/2009/dec/28/cost-losing-iem/
http://www.businessreport.com/news/2009/dec/28/goin-carolina-edvl1/

In response to a lot of the negative press about Baton Rouge I submitted an article suggestion to the Baton Rouge Business Report, which can be seen at http://www.businessreport.com/news/2010/jan/11/letters-gnit1/.  I was contacted a few weeks later by one of their writers, David Jacobs, who interviewed several of us including yours truly, Jon Dalberg, Patrick Leblanc, and William Assaf.  He and their photographer came to one of our combined meetings (1st time ever) with the SQL Server User Group at Lamar Advertising.  It was a great turnout and David obviously got a lot out of it.  You can view some of the pictures from our meeting with Ted Neward on our Facebook page:

The article was published this week with a nice picture of me “raising the roof.”  You can read it at http://www.businessreport.com/news/2010/jan/25/networking-it-tchn1/.  Thanks to all that make our user groups and events happen!  We’ll keep pushing to make this community better!  Every little bit helps. 

SharePoint 2010 PnP Guidance Drop 2 Released

On Monday the PnP team released the 2nd drop of the SharePoint 2010 Guidance.  Included is an example of a sandboxed solution, which is a good list aggregation scenario related to SOW’s (statements of work) and estimates across a number of sub-sites.  I am VERY excited about the work that is being done and guidance documentation and code that will be released soon.  You will also begin to see tests utilizing Moles for “detouring” or “mocking” as well as examples of tests using several different unit testing different frameworks including Pex.  For more details refer to http://research.microsoft.com/en-us/projects/pex/pexsharepoint.pdf.  There are now other options than just TypeMock. 

SharePoint 2010 PnP Guidance Drop 1 Released

On Friday the Patterns and Practices team released the first drop of the SharePoint 2010 Guidance, http://spg.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=38461.  It includes the upgrades for service locator, config manager, and logger.  There is some great guidance for the new Sandbox feature of 2010 in the upcoming release.  Stay tuned!

«May»
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789