You are hereVB.NET
VB.NET
.Net - Compressing directories recursively with ICSharpCode.SharpZipLib
I think there's hardly anything to explain here or give introduction about, the title says it all. I wrote a small function to zip directories recursively using the free and open-source ICSharpCode.SharpZipLib library.
So without saying many more things, here's the function:
Ext.Net - Controlling core css and javascript files rendered on the page
Our designer had created a comprehensive custom theme for ExtJs, and we wanted to use it in our ASP.NET app that leverages Ext.Net and ExtJs extensively.
If you have used Ext.Net, you would know that all ExtJs resources are embedded in Ext.Net.dll assembly that are automatically put on the page whenever you add an <ext:ResourceManager /> to the page. This includes the core ExtJs css and javascript resources (including current ExtJs theme's resources), plus Ext.Net's own resources (providing extensions/enhancements to Ext classes).
Serializing/Deserializing .Net's native RSA Public/Private keys
Okay, here's the second consecutive blog post on serializing/deserializing RSA public/private keys, this time generated by the native RSACryptoServiceProvider available in .Net (the previous post available here related to serializing keys generated by open-source Bounty Castle library).
Serializing/Deserializing RSA Public/Private keys generated using Bounty Castle library
.Net provides a good Cryptographic framework in the System.Security.Cryptography namepsace. But I have sometimes found it lacking for my needs (and non-intuitive at some other times).
Yesterday I needed to generate a RSA Public-Private key pair in a client-server communication, where the server generates the key pair and sends off the public key to the client, which the client subsequently uses to encrypt data being sent to the server. The server stores the Private key in the database used later to decrypt data received from the client and then send the encrypted response to it.
.Net - Regex pattern for lazy balanced group matching
A couple of days ago, I needed to find all calls to a specific method in a large number of javascript files. The exact method call looked something like following:
Rahul.t('String to be translated.');ASP.NET - HttpContext.Current is null in EndXXX method of asynchronous web methods pair
Well, I am in a bit of a hurry, so if you are not aware of what asynchronous web-methods in ASP.NET web-services are, or why and how to use them, check out this article on MSDN.
Essentially, you split your regular web-method (let's say XXX) to a pair of web-methods (BeginXXX and EndXXX) with particular signatures, enabling them to run in background freeing-up the ASP.NET thread pool thread for handling requests. This is only useful if your web-method is expected to perform a long-running task.
ASP.NET sets the transfer encoding as chunked on premature flushing the Response
Well, I discovered this problem and its solution sometime earlier. However lately, a couple of my colleagues approached me for advice with the same issue, and I thought of writing a blog post for the same.
In a nut-shell, the problem is that ASP.NET transfers the data to the client in chunked encoding (Transfer-Encoding: chunked), if you prematurely flush the Response stream for the Http request and the Content-Length header for the Response is not explicitly set by you.
VB.NET equivalent to PHP functions
I am currently working on an assignment to convert a Perl/PHP based intra-net project to an ASP.NET web application.
The complexity of the project has been significant as it involves the management of an internal Windows 2003 Active Directory setup for a large governmental organization, integrated with a proprietary ticketing system, and a Sql Server database. The (sometimes cryptic) non object-oriented PHP/Perl code together with a severely limited testing environment have only made the task that more difficult.
Assertions in .NET - The Assert class
No doubt Visual Studio provides extensive Unit Testing framework. Plus there are feature-rich third-party frameworks (e.g. NUnit) available for Unit Testing your .NET code.
However, I was disappointed by lack of .NET support for Assertions. As you might be able to recall, Assertions guarantee that a given expression evaluates to a true value. If it doesn't, the Assertion fails and languages have their own ways of dealing with failed assertions.
Coolite - Ensuring appropriate inclusion of script files for Custom Controls
Working on a custom Window control derived from Coolite Window control, I wanted to ensure that my script file for the custom Window gets included at an appropriate place in the page header before the ClientInitScript for my custom control.






