Archive for February, 2012

MaxRequestLength – Packet sizes: Size isnt everything

IF you have coded a file upload component in .Net before you would have probably used the Asp.Net File Upload control. You would  have also come across the fact that the default HTTP Request size for a Web Application is set to 4MB. A search thereafter would have introduced you to the maxRequestLength Attribute that is configurable in your Web.config.

Increasing this value to say 40,960 will allow 10x the default file size to be posted to your web server. This will fix your immediate file size limitation to 40MB. But what it also means is that you have now opened your Web application to accept any request 10x the standard request length. The question you need to ask yourself is, is this a good thing or is this a bad thing.. ?

In this article I will explain how to go one step further and show how you can implement a buffered and streaming approach to file downloading and uploading…

(continue reading…)

Creating a Windows Service solution

IF you have ever wondered how to create your own Windows Service then you’ve come to the right place! Creating a Windows application is rather straight forward.  You create the Solution, you add the Windows App project, add your Business logic and it is practically there.  With a Windows Service, there are some additional steps that need to be setup that might be somewhat new to developers out there.

In this article I will explain how to create a Windows Solution and the steps needed to deploy the Windows Service…

(continue reading…)

Comments Off on Creating a Windows Service solution more...

How to implement a SQL Connection Scope

IF you have used Data Adapters, you may have noticed that every call to the Fill method will instantiate a new SQL Connection. Say that you loop through a list of items and call the Data Adapter’s Fill method, each call will create a new SQL process (and can be seen in the SQL Server Activity Monitor); these processes each have their own SQL Connection established with the SQL Server – even when the queries originate from a single application request thread or method.

Not only does this require additional server resources, it is also a quick way to empty out the Connection Pool available in your system. Think of it as a DDOS attack that will ultimately block all communications to your server.

(continue reading…)

Comments Off on How to implement a SQL Connection Scope more...

Copyright © Nullable Code. All rights reserved.