Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Jan Tielens' Bloggings

Joy, frustration, excitement, madness, aha's, headaches, ... codito ergo sum!

  • Consuming Webservices over HTTPS (SSL)

    When Webservices are used, a common concern is security: SOAP messages are transferred in plain text over the network, so anyone with a sniffer could intercept the SOAP message and read it. In my opinion this could happen also to binary data, but probably it requires a little bit more hacker skills. So a solution is to use HTTPS (SSL) instead of HTTP, so the communication is encrypted. To accomplish this, you need to get and install a certificate (issued by a Certificate Authority) on your webserver. In a production environment you would buy a certificate from Verisign or another well known CA, or you would install your own CA, which is a component of Windows Server. If you only want to play with HTTPS, SSL and certificates or your project is in the development phase, you can also generate a test certificate using the MakeCert.exe tool (included in the .NET Framework SDK). After that you have to add this certificate to a website in IIS, and set a port which HTTPS should use.

  • More on Generics in .NET

    Last week, I blogged about my experiences with generics in C# and VB.NET. The focus was on applying multiple constraints for which the syntax in C# was well documented. But the syntax in VB.NET was not that easy to find, but I “discovered” it after a little bit of searching. Anyway read more about this topic here.

  • Organising Your Knowledge: Code Library for .NET

    Do you know this feeling: you're working and while coding you find a really cool code snippet. Or you are surfing the web and you find an interesting article, but way too long to read at that point. Or you're browsing through posts of weblogs you read, and there are some “must-remember” ones. You want to remember all of this valuable information, so you can go look for it when you really need it (or have time to catch up). But my personal internal memory is rather limited and cannot be expanded, so it's impossible to remember the location or contents of everything. Some time ago I started looking for a tool that could capture all this information and store it in a database making it easily searchable. For some time now, I'm using Code Library for .NET: a free tool to store all sorts of information (articles, links, code snippets, pictures, ...). It's available both for Access databases and SQL Server (or MSDE), and it has a really nice user interface.

  • Advanced Generics in VB.NET: More than one Constraint

    In one of my previous posts I tried generics both in VB.NET and C#, it turned out both languages support generics the same way. Ofcourse there is the syntax difference between them, and at this time C# has Intellisense that supports generics better, but I'm pretty sure the VB.NET team will catch up. Tonight I explored generics a little bit more; it's possible to add constraints to the generic type. By doing so, you are sure only instances can be created for the generic type, that support for example an interface you want it to. Another possibility is a constraint so the generic types must inherit from a specific base type. Let's say you have a base Entity class, from which your business entity classes inherit from, and a Customer entity class:
    Public Class Entity
        Private _id As Long

  • A First Look at AST.NET V2 (BENUG Session): a relief (PMD Pattern & DataSources)!

    Today I attended a BENUG session about ASP.NET V2 by Michiel van Otegem. Michiel put a lot of topics into his presentation and demos, so the a lot of cool stuff was briefly explained and showed. I was amazed how much new functionality was already available in this alpha release. My intrested went especially to the part when databinding comes into play. One demo showed how easy it was to drop a SQL Server table on a WebForm to create an editable grid. That's cool for a demo, but this is quite ugly for a production application: no layers, direct db access from the UI, ... Luckily there are several DataSources that can be used to do databinding, including a DataSource for Webservices and Objects. Even if they were not available it wouldn't be a problem because Whidbey used the Provider Model Design Pattern, so there is an IDataSource (don't remember the exact name) interface. You can create your own DataSource class by implementing this interface. Great!