Tallan's Blog

Tallan’s Experts Share Their Knowledge on Technology, Trends and Solutions to Business Challenges

Uploading file: the .NET MVC way

In ASP.NET, the traditional way of uploading files is as follows.
<form id=”form1″ runat=”server”>
<asp:FileUpload ID=”FileUpload1″ runat=”server” />
<asp:Button ID=”Button1″ runat=”server” Text=”Upload”
OnClick=”Button1_Click” /></p>
<asp:Label ID=”Label1″ runat=”server”></asp:Label></p>
And you have access to the uploaded file like this.
protected void Button1_Click(object sender, EventArgs e)
In .NET MVC, you can achieve the same with the following code.
<form action=”/controller/action/” accept-charset=”UNKNOWN” enctype=”multipart/form-data” method=”post”>
<label for=”file1″>file1</label>
<input id=”file1″ name=”file1″ size=”20″ type=”file” />
The controller side
foreach (string fileName in Request.Files)
HttpPostedFile file = Request.Files[fileName ];
It is important to understand the fundamental difference between the traditional web-form based .NET programming methods and the .NET MVC methods. You can still use the server controls, but you can only use them for read-only data rendering purpose, since ViewState is no longer an option in .NET MVC.

Compression using the GZipStream and DeflateStream in .NET

Reddy Kadasani

What is GZipStream and DeflateStream?
There are two basic compression methods that are exposed in the .NET I/O Framework i.e. System.IO namespace : GZIP and DEFLATE. They (Compression methods) are exposed via streams and support both compression and decompression (which ofcourse makes sense!).
Compression Streams in .NET


Important Facts
The compression streams in .NET support compression of streams with a maximum size of 4GB. You will have to break your file down if it is larger than 4GB. A drawback of the .NET compression methods is that you cannot compress multiple files into a single archive file, like you may be used to with WinZip or other similar tool. Atleast this is not avaialable out of the box.
Which one to use – GZip or Deflate?
Both these methods use the same compression algorithm (RFC 1952). But if you are going to be interfacing with other…

Working with Isolated Storage in .NET

Reddy Kadasani

What is Isolated Storage and Why use It?
Putting it simply, an isolated storage is a “place” where an application can store its state information- things such as user settings, some assembly and application configuration information, and other application/assembly state information. So what is so different about that right?
Well a few things and some of these pertain to or relate to application and computer security. Let me explain, usually when an application tries to persist application state, it has to deal with user access rights, trust levels and so on. One way to resolve this is to give the application whatever rights it needs and potentially open up your computer to malware and spyware. Another way is to save information in the database. Now, the latter might be a viable option but in some cases complicates matters. Remeber when you just…

BizTalk and Systems Center: Operations Manager w/ BizTalk Management Pack

The BizTalk 2006 R2 Management Pack is a rewrite from the original pack for Microsoft Operations Manager 2005 (MOM).  It is designed around all of the new features of BizTalk 2006 R2 including RFID and EDI.  The pack ties into SCOM very nicely and once it has been imported into SCOM, it can automatically scan the network and will detect your BizTalk environment.

The main purpose of the pack is to
·         Monitor BizTalk events
·         Collect BizTalk specific performance counters in one central location
·         Raise alerts on events

This pack is designed to provide the following services
·         Availability Monitoring
This can detected a multitude of items with very little configuration.  It will automatically detect if a send or receive port goes down, connection problems with the BizTalk database, messaging engine connection issues with the SSO database.

·         Health Monitoring
You can use Health Monitoring rules to…

Free Seminar: Breakthroughs in Microsoft Integration

For those in the Connecticut area…
Tallan is providing a complimentary executive lunch around the topic of Microsoft Integration. It includes a talk by Tom Stickle, Program Manager at Microsoft for the Connected Systems Division, about the new integration features in BizTalk. In addition, there will be a real-life integration case study from a CT-based company.
The event will be held from 11:00 AM until 1:00 PM on June 10th at Lake of Isles in North Stonington, CT (part of the Foxwoods Resort), where an executive lunch will be served.
Here is the link to more information about this event and how to register.

New England BizTalk User Group presentation

I gave a presentation on BizTalk High Availability options to the New England chapter of the BizTalk user Group on May 14th.
Here is a link if you are interested in downloading the presentation (powerpoint 97-2003 format).

Java: Too many choices?

During my time with Tallan I have worked in both the MS camp and the Java camp. I prefer the Java side but I acknowledge that neither side is perfect. One of the main issues I see on the Java side is the huge variety choices that an architect has when starting a new project. I saw this article on DZone that seemed to summarize the situation well:
There is an interesting link from this blog posting. I have not read it in depth. It looked good on an initial skim. The author seems to be trying to be objective, rather than selling one framework over another. (Go past the pictures of his family… would be interesting to hear the presentation that goes along with this PDF):
Comparison of frameworks:
I am interested in hearing others point of view on this (not looking…

Add to the Global Assembly Cache on MSI Imports

Dmitriy Gitelman

If you want all resources of your BizTalk application to be registered in GAC on MSI import, it is necessary, prior to exporting BizTalk application to MSI file, to check ‘Add to the global assembly cache on MSI imports (gacutil)’ option in Modify Resources dialog box. This option is unchecked by default. To avoid the need of doing it for each resource separately, do the following:

Open dbo.bts_application table in BizTalkMgmtDb database

Find application name in nvcName column and write down the Application ID (nID column)

Run this update statement in BizTalkMgmtDb database (replace <app_id> with Application ID retrieved in #2):

update dbo.adpl_sat set properties = replace(cast(properties as nvarchar(4000)),
‘UpdateGacOnImport</key><value>False’, ‘UpdateGacOnImport</key><value>True’) where applicationId = <app_id>

Testing BizTalk Applications

Lee Rodgers

Found a great resource today for how to go about testing BizTalk applications.  It covers best practices on how to unit test various BizTalk artifacts such as schemas, maps, pipelines, orchestrations.  This covers how these should be covered with tests for integration testing as well as functional testing.  Very interesting read.

How to Easily Document BizTalk Applications

Lee Rodgers

One of the tasks developers find most tedious is documentation.  It gets to the point that documentation never gets done in many cases.  This is where documentation tools comes in handy.  There is a documentation tool that is available that analyzes the BizTalk application and creates a CHM file containing:

Send & Receive Ports
Schemas & Maps
Business Rules
And More

The tool is an open source project that can be found on CodePlex: