Monday, April 26, 2010

HttpContext.Current.User.Identity.Name is emtpy

If this happens to you, it's likely you forgot to disable anonymous access for the application.

Wednesday, April 21, 2010

Connecting to an ADAM (Active Directory) instance

There are plenty of articles that will explain how to use AD in .NET. For example, http://channel9.msdn.com/posts/RobertShelton/Searching-Active-Directory-with-NET-Visual-Studio-2005/

The trick (that worked for me) was to use AuthenticationTypes.None when creating a DirectoryEntry.

Saturday, April 17, 2010

WCF Services proxy add extra parameters

When calling a WCF service, an output parameter was added to the method. This only happened after adding a second WCF service, and the solution was to add the XmlSerializerFormat attribute to the ServiceContract. Check out this article http://msmvps.com/blogs/windsor/archive/2008/05/17/calling-wcf-services-from-net-1-1.aspx

Friday, April 16, 2010

Debugging custom actions in a Visual Studio 2008 installer

It's simple. Just add the following:

public override void Install(IDictionary stateSaver)
{
Debugger.Break();
...

In order for this to work, I also had to (obviously) build the installer in Debug mode and make sure that Debugger.Break was the first statement in Install(...). This article was really helpful http://harriyott.com/2007/02/debugging-custom-actions-in-visual.aspx

Saturday, April 3, 2010

Hello World

I migrated my blog from my own domain to blogger.com. Transferring the data from my old domain (rortizma.net, which used DNN) was kind of a pain but it's done. Also, blogging using my old domain was too difficult, since I had to do maintenance on the website really often. Using blogger.com should be easier since Google takes care of the back-end.