Archives
-
Seeking advice - strong names and config files
I'll use my blog for a bit of fishing for advice and guidance on an issue that's been bugging me. We've been moving towards using strong names on all of our assemblies. The benefits are obvious, and … more
-
System.Diagnostics.EventLogEntry and the non-equal Equals.
Just a quick heads-up in case you're stumped with this problem, or just passing by: The System.Diagnostics.EventLogEntry class implements the Equals method to check if two entries are identical, even … more
-
Displaying live log file contents
I'm writing some benchmarking code, which involves a Console application calling a COM+ hosted process and measuring performance. I want to constantly display results on my active console, but since … more
-
Another minor C#/C++ difference - adding existing files
Another minor detail that bit me for a few minutes today. I'm posting this so I'll see it and remember, and possibly lodge it in other people's consciousness. Using Visual Studio 2005, adding an … more
-
Another Sharepoint Web Services rant : untyped data vs. incompletely typed data
Working with the Web Services in WSSv2 and v3 is an exercise in sheer frustration. I've written before about serious and glaring omissions in the Web Services API that Sharepoint exposes, but it's … more
-
Return of the GC Hole: Another one from the C++/CLI trenches
A few days ago I wrote of a GC hole I accidently created in my C++/CLI code (with thanks to commenter Nish for the name of the phenomenon). I had the following code snippet set inside a private … more
-
Windows Services, services.msc and the "This Service is marked for deletion" error.
In my current project, we have a windows service that we are developing and debugging, which involves a lot of installing/uninstalling the service. One common problem when uninstalling a service is … more
-
Dynamically creating a Sharepoint Web-Service proxy instance
In my current code, I find myself accessing many Sharepoint web services. In one run of code I can access 5-6 different web services on dozens of different sites, not necessarily even on the same … more
-
Visual Studio help-launcher rant
Yes, I know I am far from the first to bemoan the atrocious behavior of Visual Studio 2005 when you press the F1 button, even accidently. The first time you do it - or other times, if it deems the … more
-
Wrong constructor called in COM+: sneaky, sneaky bug
Here's another nasty one that tried to bite me today. Let's say I have the following classes: public class COMPlusClass : ServicedComponent{ public COMPlusClass() { … more
-
Unmanaged deployment is a true DLL Hell
By a staggering margin, most of my problems integrating C++/CLI code into my C#-based project has been deployment problems. Without fail, every integration or test deployment will be plagued … more
-
More Tales from the Unmanaged Side - System.String -> char*
Today, I had a very tight deadline to achieve a very simple task: pass a managed .NET string to an API function that expects a null-terminated char*. Trivial, you would expect? Unfortunately it … more
-
A C# coder in a C++/CLI world, part 1
Recently I've found myself stumbling around some C++/CLI code. C++ is a language which I learned years ago and never really worked with seriously, so I've been cursing and moaning as I worked. … more
-
Allowing timeout on long-running operations - possible bug
A while ago, I wrote about a simple pattern to allow us to put a timeout limitation on a long running operations. Simply put, it allows us to replace this: public MyObject GetData(){ try& … more
-
Waiting for a return value from an asynchronous method
The topic of the post might not make sense, initially. If I invoke a method asynchronously, why would I want to wait for a return value? And if I'm waiting, what's the point of launching it … more
-
Some more glaring omissions in the Sharepoint 2007 SDK and Web Services
I downloaded the new Sharepoint 2007 SDK today, published last week though it's dated from April 2007. There appears to be no change history for this version of the SDK. I was hoping for … more
-
No Per-item permissions in WSSv3's Web Services?!
How did I miss this until now? It's great that WSSv3 and MOSS give us granular permissions, and it's great that I can access those permissions via an SPListItem's RoleAssignments collection - but is … more
-
Retrieving all properties for a Sharepoint list
When we call the GetListItems or GetListItemChanges methods in Sharepoint's Lists Web Service, we pass an XmlNode parameter specifying which fields we want to return, in this format: < … more
-
Yet ANOTHER C# language enhancement - this_method()
This one was suggested by a coworker leery of accidental recursion. Too many people aren't used to thinking in terms of recursion and will miss a recursive call inside a method and accidently start … more
-
Another pointless operator for C#
I remember discovering C#'s null coalescing operator a while ago. I can't say I use it a lot, but it's useful to clean up my code when I do need it. However, there is another similar scenario that it … more
-
Granting User Rights in C#
As a follow-up to my previous post about changing a Windows Service's user account - there was one think I forgot. In order for a user to run a service, that user must be granted the "Run as Service" … more
-
Setting Windows Service Account - C# and WMI
I've been busting my brains for over two hours trying to accomplish a relatively simple task - changing the username and password of a currently running Windows Service. Should be trivial enough, but … more
-
Custom ConfigurationSectionHandlers in InstallerClasses
I'm writing an installer class for an MSI Setup Project, and find myself needing to manipulate my web.config containing a custom ConfigurationSection. This should be trivial seeing as my … more
-
InstallerClasses and little-known gems.
I'm writing an Installer class for an MSI installer project, and passing a checkbox's value from the MSI UI. I noticed that when I pass the checkbox's linked variable into my code, it's received as a … more
-
Preventing Outlook from closing with Alt-F4
I have come to the realization, at some point, that I never want to close Outlook. Really, there's no reason for me to shut it down except when doing something special, like freeing every … more
-
Customizing MOSS Page Title
Another odd client request that came in a while ago. When we browse our Sharepoint site, IE's title reads "Home - My Site Name - Windows Internet Explorer". We can't find any way to remove the " … more
-
Dependency Injection and a new version of RhinoMocks
I'm a relative latecomer to the unit-testing business, and only got to play with Mocking frameworks in my last project. After testing several frameworks, we opted on RhinoMocks for emulating our … more
-
Reflecting over an Event
A coworker (Hey, Evgeny!) came to me with a puzzler today. He has an object that exposes an event, and he wants to know whether he's already subscribed to that event. Two things immediately came … more
-
Sharepoint Extensions for Visual Studio - released!
Finally, we have a full, RTM version of the Visual Studio extensions! The download page says March 15th, but I haven't seen anyone mention it around yet - could it be just me that missed the boat? I … more
-
Session Error with Reports Center under MOSS 2007 - Not what you expect
Ran into a problem with a client today. They installed MOSS 2007 and created a publishing portal, but then decided to erase the Reports Center, since they had no use for it. A few days later, … more
-
Sharepoint Extensions for Visual Studio 2005
Any news on when a new release of the extensions are due? The state of the current tools is downright abyssmal. Even ignoring the requirement to run VS on the Sharepoint server machine, half the … more
-
Word 2007 and Sharepoint Workflows
I've got a couple of questions about Word 2007 integration with Sharepoint 2007, and several problems that occur because of it: The Mysterious Checked-Out Error Let's say I have a workflow attached … more
-
"Trial Expired" errors in unexpected places.
I've installed MOSS 2007 RTM on a couple of test VPCs here, using the 180-day trial version. Everything worked fine until I tried to create a new page in my Publishing Portal - suddenly … more
-
MOSS Workflows are versioned
I was asked today about MOSS's behavior when workflows are changed midstream. Say I have a document library with a Workflow attached to it, start a few long-running (non-immediate) workflows, then … more
-
Screencasts vs. Whitepapers
A few weeks ago, Lawrence Liu (a senior technical PM and community lead for Sharepoint at Microsoft) linked to a few screencasts for learning how to use various features in MOSS2007. In that entry, … more
-
Bad naming - Sharepoint Features
Gaaah! Who, in the name of all that is holy, thought that naming a feature in Sharepoint "Features" would be a good idea? Sure, it describes it, but it also describes practically everything else. It' … more
-
Outlook Calendar as your Windows Desktop
In a Channel 9 conversation, user Dr. Herbie expressed his long-standing desire to see his Outlook calendar as a desktop wallpaper. This, I admit, has never once occured to me. The nice thing about … more
-
Exposing add-in errors in VSTO for Word 2007
One of the most annoying things about writing add-ins for Office is that it tends to swallow any and all errors that occur. All exceptions are silently thrown into the trash heap without even a … more
-
Zune Desktop Theme - A Warning
A few days ago, Microsoft released a new Desktop Theme for Windows XP named the "Zune Desktop Theme" – even though it looks a lot like Vista, all in black and orange. It fits in with Office 200 … more
-
VSTO for Outlook 2007 - Building the Add-in (part 2)
Writing the Outlook add-in described in my previous post was composed of the following steps:1) Creating the projectAh, the wonders of VSTO. Saving us all the unnecessary hassle of adding COM … more
-
VSTO for Outlook 2007 - New Features, More Fun (part 1)
IntroductionOutlook has always been a bit of a latecomer to the VSTO game, being a step behind and a version later than Word and Excel. I'm glad to see that with Outlook 2007 and VSTO 2005SE … more