Blog
HOWTO: display your assembly @ Add Reference
You might want to be able to let your assembly show up in the Add Reference window in Visual Studio without the user having to browse for it. When you install your assembly in the GAC, it doesn’t automatically show up in the Add Reference window, because it doesn’t enumerate all assemblies in the GAC. Installing in the GAC only eliminates the need to copy assemblies localy when referencing them. Microsoft doesn’t recommend putting assemblies in the GAC by the way…
Blog
A failure occurred writing to the resources file. The system could not find the file specified.
We received the above error for the resx file of a form in our project today. So we checked the existence of the resx file it concerned, and it was there. So maybe the file was corrupt? We deleted the file, removed it from the project and let Visual Studio re-create it by editing the form in the designer. Building the solution gave the same error… again the file was right where it was supposed to be.
Blog
Microsoft releases ‘Acrylic’ beta
Microsoft has released a beta for the program codenamed ‘Acrylic’. According to some people this might be Microsofts attempt to compete with Adobe, because it is said the program is the ideal combination of vector based graphics (Illustrator) and pixel based graphics (Photoshop). Is this Microsofts answer to the domination of Adobe in the graphics department?
I downloaded (free) and installed it today, but I haven’t had time to check it out.
Blog
A custom SOAP fault handler and a ‘Reference not set to an instance of an object’ error …
Today we had a problem on the project I am working on. To be more precise: I had a problem, the other team members did not.
Quick explanation: We have a server component which uses a web service for some of the functionality we need. Other functionality can be found in a different system which is reachable through IBM WebSphere MQ. The server component is available through remoting, the objects are hosted in IIS.
Blog
Tabbed browsing in IE6
Although I don’t like Internet Explorer toolbars at all, I’m thinking about installing one. MSN toolbar V1.2 now gives your IE5.1+ browser the cool feature of tabbed browsing. This IE7 preview kind of thing is available for download together with Windows Desktop Search functionality and some more stuff. Read about the functionality here, or just get it.
Blog
Visual Studio .NET Bootstrapper
Have you ever made an install for your application with Visual Studio and sent it out into the world, only to get complaints of people that your software wouldn’t run?
“Have you got the Microsoft .NET framework installed?”
“The what?”
“Go look in control panel, …… ……”
“Ow, yeah, I got that”
“Hmmm….”
“So ehm….”
“What version is it?”
“Version? …. wait …. it’s 1.0”
“Darn, download it and …”
Blog
Controls disappear from the Windows Forms Designer in VS2k3
We recently ran into the problem mentioned in the title of this post at work. Microsoft has a knowledgebase article (kbid 842706) for this bug. The hotfix is not to be distributed freely, but I already spoke to some people who have contacted Microsoft and got the fix for free. It will be e-mailed to you.
As you can read in the comments of this post at dotnetjunkies, there are some people who found no more problems after installing hotfixes KB841870 and KB841767-X86… I think that’s weird (but I’m not arguing!
Blog
Update
Sorry I’ve been away for a while, but there was hardly enough time between work, friends, birthdays and deadlines for me to blog… I’ll try and make up for lost time.
Last sunday my girlfriend turned 25: we had a killer party! Almost 40 people visited our apartment in Eindhoven, so it was pretty crowded in out otherwise quiet home. Thanks to all of you.
And then there’s been the project I’ve been working on: the first delivery is next thursday, so I’ve spent quite some time there.
Blog
HOWTO: Encode a password using MD5 in C# (or: howto calculate the MD5 hash for a string)
The following method returns the MD5 hash for any given string. For instance for a password. It might be of some assistance when you’re trying to validate user credentials but you don’t want to store the password readable in the database.
For this method, you’ll need the following using statements:
using System; using System.Text; using System.Security.Cryptography; [...] public string EncodePassword(string originalPassword) { //Declarations Byte[] originalBytes; Byte[] encodedBytes; MD5 md5; //Instantiate MD5CryptoServiceProvider, get bytes for original password and compute hash (encoded password) md5 = new MD5CryptoServiceProvider(); originalBytes = ASCIIEncoding.
Blog
Commenting your code – The sequel
As Ernst put it in the comments: we opened a can of worms here!
In my previous post about Commenting your code, I stated you should not comment your code. Of course, this is nonsense. The reason I stated that, however, isn’t. And I didn’t only say that because I would get some attention 😉
Too many times, I see complete useless naming of variables, classes, methods and so on. Because of this incomprehensible naming the developer who wrote the code then has to place enormous amounts of comments between his code to keep it even remotely understandable, even to himself.
Blog
Commenting your code
There are several ways to comment your code. There’s the style where you place comments on the same line as the code. This might get less readable, because there’s some horizontal scrolling involved when your statements get longer. An example:
string s; //Declare string s = e.Message; //Assign exception message to string s Another way to place comments in your code is to place every comment on its own line. This is less readable when you get long methods, because your methods will get twice as long because of the comments!
Blog
HOWTO: Draw your own string (URL, copyright) on each displayed picture in an ASP.NET website
The AdRotator .NET provides can be used to show a different image each time a page is visited. You could write a webpage which does this for you, but it’s probably not very useful. Although you need to change the XML file when changing the images to be showed when you use an AdRotator, but that’s not the issue here.
Something .NET doesn’t deliver is a control to add your own text to an image when it is displayed on a webpage.