Tags: dot net

Using WSE 3.0 with Visual Studio 2008 and .NET 3.5

While I’m sure many of you have “moved on” to Visual Studio 2010, there are a large number of us still using 2008. Recently, my shop needed to write some code for interfacing with a vendor’s web services. No problem, right? Well… not quite. It was quite an undertaking to get a functional wrapper class for our vendor’s web service shoehorned into Visual Studio 2008 and the .NET 3.5 platform. Read More →

Custom error messages with ValidationSummary in ASP.NET

Sometimes, there are problems encountered in a code-behind file that don’t warrant the extra work and mark-up that would otherwise be required to add CustomValidator controls to the page for displaying error messages to the user through your ValidationSummary. Wouldn’t it be nice if you could (somewhat) easily take care of it in your code-behind file alone, without adding additional clutter to your UserControl/Page/etc.? Well, you can! The following IValidator extension class can be added to a Page‘s Validators list with ease for displaying custom error messages. Read More →

Programmatically modifying file permissions in .NET

For one reason or another, somewhere down the line, you’re probably going to want to modify a file’s access permissions from your code. Maybe your users have a nasty habit of overwriting them, or you want to ensure that newly-created files are given a specific permission mask. Whatever the reason, the following C# code example shows how to modify a file’s access permissions using the System.Security.Principal and System.Security.AccessControl namespaces. Read More →