Posted on May 20th, 2011%
Back in the days of Web Forms, there were server controls, and they generated rather CSS-unfriendly HTML. So, Microsoft got someone (Russ Helfand) to write adapters that changed their rendering to be more CSS-friendly: the “CSS Friendly Control Adapters” were born.
A little less farther back, in 2007, I tried convincing some people at Microsoft to let the community continue development of these adapters, and they agreed. The CSSFriendly CodePlex project was born, and a bunch of bugs and some new features were added.
A lot has changed since then, but the adapters still have use today for people stuck on .Net 2.0 (they’re in the top 200 most downloaded CodePlex projects, and their forums still see activity). To facilitate those who still use CSSFriendly, I’ve added the library package to NuGet.
How to use the CSSFriendly NuGet package
In four easy steps (three if you already have NuGet).
First, you need Visual Studio 2010 and NuGet. (If you’re . . .
→ Read More: CSS Friendly Control Adapters now available on NuGet
Posted on March 22nd, 2011%
Today, a user reported an issue connecting to a very old CRM application. I logged in to the system myself and saw no error. Since I’m not happy with self-healing issues, I went digging into the event log on the server.
For the past five days, there have been over 15,000 entries added to the System event log with event ID 333: “An I/O operation initiated by the Registry failed unrecoverably. The Registry could not read in, or write out, or flush, one of the files that contain the system’s image of the Registry.” That doesn’t sound good.
My first stop for analyzing event log errors is eventid.net. The feedback on their site pointed me to a few possibilities.
The /3GB switch on a system with 2GB or less of memory.
Symantec AntiVirus (which is a potential culprit to every system problem, apparently).
Insufficient Non Paged Memory . . .
→ Read More: Insufficient pagefile size can cause obscure memory errors
Posted on March 6th, 2011%
What’s the textbook definition of a constructor in C#? According to Microsoft (emphasis added):
Whenever a class or struct is created, its constructor is called. A class or struct may have multiple constructors that take different arguments. Constructors enable the programmer to set default values, limit instantiation, and write code that is flexible and easy to read.
That’s not a great definition, but it tells us some important things:
There can be many constructors.
Constructors may or may not have parameters.
Constructors should be used to:
set default values,
perform limited initialization, and
be simple.
In other words, constructors should do as little as possible.
Constructors should:
initialize fields and properties
check the runtime configuration and environment
fail if the object can not be set up properly
be consistent, in therms of logic (when using multiple constructors)
be thread-safe
Constructors should not:
invoke complex business logic (example)
use out parameters (example)
accept arrays, . . .
→ Read More: A practical definition of C# constructors
Posted on January 13th, 2011%
I’ve been trying to find a SQL programmer/DBA to hire for nearly two months. Each qualified resume I receive gets the same technical screening email with four SQL-related questions. They are not difficult, and most mid-level candidates would be able to answer them in their own words.
“Using someone else’s words isn’t going to get you a job, or help you keep a job if you get it.”
The tip here is to always respond to a technical screening email in your own words. We all know that there are answers to every question on the internet, and we all use the internet as a resource to help solve our problems. This is fine. But when someone sends you an email with technical questions, they want to hear the responses in your own words. It’s OK to provide references to web sites, or quotes/snippets — this shows you know how to do research. But don’t pass off the whole response as your own.
In . . .
→ Read More: Tip: Don’t plagiarize when answering technical interview questions
Posted on December 21st, 2010%
Today, I needed a PFX (public key file) to sign a ClickOnce deployment. I spent a fair amount of time trying to figure this out, so I figured I’d share it!
There were plenty of suggested solutions out there, but the best one was from MSDN blogger Maxime Lamure.
In short, do the following, replacing MyCert with the certificate file name (without extension), MyName with the name you want on the certificate (your name, or a company name), and password with the public key password.
Open a Visual Studio Command Prompt. If using Windows Vista or Windows 7, be sure to run as Administrator.
Create your certificate (.cer) file by typing: makecert -sv MyCert.pvk -n “CN=MyName” MyCert.cer
Create your public key (.pfx) file by typing: pvk2pfx -pvk MyCert.pvk -spc MyCert.cer -pfx MyCert.pfx -po password
At the end, you’ll have your very own certificate file and public key!
. . .
→ Read More: Create your own .pfx file for ClickOnce
|
|