Hits

Jan 6, 2012

Open Source for .Net Development

Summary

I wanted to list good alternatives to the Microsoft stack for developing websites with Microsoft ASP.Net MVC technology.

Jan 3, 2012

Threadsafe Invocation

Summary

In my opinion, all Windows Forms applications should be designed in a thread-safe manner instead of having everything run on the main UI thread. Use the following code to update the form's controls from your worker thread.

Dec 22, 2011

ASP.Net MVC4 Mobile Tutorial - Part 3

Summary

Continuing from our discussion around a sample ASP.Net MVC4 Mobile application, this final post will discuss the final piece; the UI and how it all comes together.

ASP.Net MVC4 Mobile Tutorial - Part 2

Summary

In the last post, we covered the database design and the Entity model for the sample ASP.Net MVC4 Mobile application. We will continue with the Service layer in this post.

ASP.Net MVC4 Mobile Tutorial - Part 1

Summary

The ASP.NET MVC 4 Developer Preview introduces also new template for mobile web applications which use jQuery Mobile – a special jQuery library for building mobile user interfaces.

In this posting I will show you how to build a new mobile web application based on my real world experience of tracking the feeding activities of my 4 month old baby.

Dec 20, 2011

Elmah Exception Logging with Azure

Summary

If you have an ASP.Net project mapped to an Azure worker role, then Elmah is a great exception handling framework for providing near code-less, world class exception handling for your project. Read on for a step-by-step guide.

Dec 18, 2011

NodeJS and Windows Azure

Summary

NodeJS offers a server side JavaScript programming model ideal for building highly scalable and performant network applications whether on premise or in the cloud. It allows you to write code that is uses non-blocking IO thus achieving greater scale. It is also small and lightweight. It has a very rich ecosystem of modules like express and socket.io which developers can pull in using the awesome node package manager otherwise known as npm. Microsoft has partnered with Joyent to port Node and NPM to Windows.

Dec 12, 2011

SharePoint Managed Account Password Expired

Summary

My local SharePoint development environment uses my corporate login as the farm account (since I cannot create another AD forest without messing up my corporate login). When my password needs changing, my local environment gets messed up and I am not able to access the Managed Account via Central Admin to change its password.

Nov 29, 2011

Get User Profile Owner

Summary
Do you need to get the owner of the user profile in SharePoint to conditionally display sensitive data? If yes, then read on... (Tip from colleague Kiran Bellala)


ProfilePropertyLoader.GetPageProfile method can return the user profile associated with the page.
(http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.portal.webcontrols.profilepropertyloader.getpageprofile.aspx)


UserProfile thisPageUserProfile = ProfilePropertyLoader.GetPageProfile(this.Page);
string thisPageAcctName = thisPageUserProfile["AccountName"].Value.ToString();
string loggedinUserAcctName = HttpContext.Current.User.Identity.Name;            
if (thisPageAcctName.Equals(loggedinUserAcctName))
{
      Label1.Text = "This is my user profile";
}
else
{
     //this is not my user profile. hide the web part
     this.Hidden = true;
}
Keywords: SharePoint User Profile

Nov 17, 2011

Dynamic Rows to Columns

Summary

Do you have a situation where you have data in your table rows that you want to transpose into columns? Furthermore, you are not sure of the number of columns you want to transpose?

Read on below for a straightforward approach on how to use the Sql Server PIVOT statement combined with dynamic SQL to easily transpose any number of columns.