Sign up

lennybacon.com Valid
Text

Lennybacon says #1: Exceptions and ValidatorControls

I often get asked things through my messenger and today I decided to start sharing a few lines of the conversations… Frank:
Is there a way to connect a Validator to an Exception so that the validation summary can be used to display the exception message?
Me:
Build a Custom Validator
Frank:
Ok
Me:
Use Page_Error or catch to set a “flag” to the Validator
Me:
Override the method EvaluateIsValid and return the state of the flag

lennybacon.com Valid
Text

Get SPAM Button

lennybacon.com Valid
Text

Encrypting Files using DPAPI

In one of my current projects (yes, there are more at the moment and yes that is the reason why it’s a bit quiet around here) i neede to write an encrypted file to the hard disc using DPAPI (Data Protection API). After I unsuccessfully searched the web and the msdn (the sample reads all bytes to the buffer at once - not so nice), I wrote the following sample app:

lennybacon.com Valid
Text

UG Meeting Tools List

MDFExec
Executing CREATE statements from within Visual Studio 2005
Snippy
Editor for creating and modifying Visual Studio 2005 Code Snippets
WebServer Here Context Menu
Exclude From Sharepoint
NDoc Macro
Cropper
Screenshot tool
Ruler
Folder Size Browser
Convert.NET
C# 2 VB.NET Converter
ChalkTalk
Mistaya
LDAP Explorer
WinMerge
Thomas list…

lennybacon.com Valid
Text

Wouldn't it be cool ...

lennybacon.com Valid
Text

Executing CREATE statements from within Visual Studio 2005

If you try to run a CREATE statement in a query (right click on a database in the Server Explorer) you receive this message.
So i wrote a small utility which will do the job for me.
using System; using System.IO; using System.Data.SqlClient; using System.Collections.Generic; using System.Text; using System.Windows.Forms; namespace MdfExec { class Program { static void Main(string[] args) { string _cnStr; if (args.Length == 2) { _cnStr = "data source=.

lennybacon.com Valid
Text

Customizing the Prop Snippet

I’m quite busy with a project I’m on with Clemens(the last time before he’ll join the Indigo team at Microsoft) - just to explain why it got bit quiet around me :-) Here is a modified version of the prop snippet that I want to share (and remember :-P). <?xml version="...

lennybacon.com Valid
Text

Complex Databinding

I just finished writing some ASP.NET code where I also typed the following lines:
<ItemTemplate> <asp:Image ID="IsOnline" runat="server" ImageUrl='<%# GetImageUrl((MembershipUser)Container.DataItem) %>' /> </ItemTemplate> protected string GetImageUrl(MembershipUser user) { if (user.IsLockedOut) { return "~/images/BadUser.gif"; } else if (!user.IsApproved) { return "~/images/GreyUser.gif"; } else if (user.IsOnline) { return "~/images/OnlineUser.gif"; } else { return "~/images/OfflineUser.gif"; } } Before I shutdown my machine I fetchted Mail and Feeds when i ran accross this posting by ScottGu pointing to Fritz Onions Blog.

lennybacon.com Valid
Text

Catastrophic Failure

No Comment :-P

lennybacon.com Valid
Text

Schni, Schna, Snippy

Via Peter:
Snippy – Darren May found this cool little client app for creating VS2005 code snippets. And to think I’ve been doing them by hand all this time… […]

lennybacon.com Valid
Text

Monitoring Javascript Exceptions

Jonathan Cogley has posted a nice piece of javascript: http://weblogs.asp.net/jcogley/archive/2005/12/07/432584.aspx
ASATISMT (As Soon As There Is Some More Time) I need to wrap smth like this with a control…

lennybacon.com Valid
Text

Community Launch 2005

Die INETA (International .NET Association) User Groups VfL-NiederRhein und NET UG Düsseldorf feiern die Veröffentlichung von Visual Studio 2005, SQL Server 2005 und BizTalk Server 2006!
Microsoft® Visual Studio® 2005 und SQL Server™ 2005 und BizTalk Server 2006 sind in Englisch am 7. November erschienen. Die deutschen Sprachversionen werden in einigen Wochen verfügbar sein werden. Anlässlich der Veröffentlichung laden die INETA Usergroups alle Mitglieder und Interessierte herzlich ein, den Launch zu feiern.

lennybacon.com Valid
Text

Yesterday The New Issue Of The MSDN Magazine Eu

Yesterday the new issue of the MSDN Magazine Europe arrived in our office. It includes my article about my travel to the DDD Developer Day in Reading.

lennybacon.com Valid
Text

Friday Night Andreas Hoffmann 2nd Lead Of The VfLNiederRhein User Group Picked Me Up Ad We Drove The Long Way Down To The

Friday night Andreas Hoffmann (2nd lead of the VfL-NiederRhein user group) picked me up ad we drove the long way down to the south.
Our destination for Saturday morning was the Chaostage event of the .NET user group Deggendorf (http://dotnet-deggendorf.sefnet.de/). I had a session “Introducing the concepts and architecture of ASP.NET“ in the morning and a second one “Hello WebServices – Message-Oriented Programming for distributed systems” in the evening.
We checked in at our hotel in Garching (I won’t tell the name but I’ll tell you a bit about the worst service).

lennybacon.com Valid
Text

Code like I want to see it with ASP.NET 2.0

A short statement additional to my post against the spagetti code because I think Scott got me wrong:
<sarcsam>The Object Data Source is one of the coolest things out there cause it’s never been so easy to use n-tier applications and bind custom business objects to databound controls. And this is exactly what I tell the folks out there in my articles and talks.</sarcsam>

lennybacon.com Valid
Text

ASP.NET Features vs Real Applications

The most important thing to point out whenever I talk about ASP.NET 2.0 data-driven applications is:
With the SqlDataSource and GridView or
DetailView controls you can
quickly build up tiny applications that just need to be set up asap.
This has to do nothing with REAL
best practice applications!"
Therefore I was pretty happy to read “The Code Spaghetti generation is back” in Pascal Leloup’s Blog.
Here is my statement:

lennybacon.com Valid
Text

DDD - Developer Day 2005, Reading: Photos

Me and Benjamin Mitchell
Barry Dorrans
Me and Ian Griffiths(Pluralsight)
Richard, Me, Craig Murphy, Tim and VBUG man
Me and Amy Sorokas(Microsoft)
Phil Winstanley
Oliver Sturm
Speakers in the Space Bar
The Geek Diner

lennybacon.com Valid
Text

Cool Tool: Cassini here power toy

[…]The .NET Framework 2.0 comes with a built-in webserver, based on the old Cassini web server. So I wanted to be able to easily set up any directory to have its contents served up on an as-needed basis. The result is an addition to the Windows Explorer right-click menu…[Robert McLaws]
Chris Fraizer wrote it thgether in a small app.
Here is my version with a few modifications:
using System; using System.

lennybacon.com Valid
Text

Back from Developer Day #2 Reading UK

Wow, what a weekend. Just so short cuz my desk is quite full - but I promise to tell more tomorrow.

lennybacon.com Valid
Text

ISA 2004 and FTP 550 Access denied

Problem When connecting through a Microsoft ISA 2004 server, the FTP client has read only access to the files and folders. e.g. Uploading, renaming or deleting a file or folder is not possible. The FTP server replies with a “550 Access denied” message if such operations are performed.
Solution
Microsoft ISA 2004 server (acts as Firewall) default settings only allow read access (list and download).
To change this settings open ISA management Select Firewall policy -> Web Access -> Protocol -> Filtering ->Configure FTP