Slightly after the release of BizTalk Server 2010 a Feature Pack has been released. This feature pack contains only one feature which is named BizTalk Server 2010 AppFabric Connect for Services. It provides for bridging the capabilities of BizTalk Server and Windows Azure AppFabric thereby enabling enterprises to extend the reach of their on-premise Line of Business (LOB) systems and BizTalk applications to cloud.
I'd like to use this blog to share my knowledge in software development and to give solutions to fiddly problems I had from time to time in this area.
Mittwoch, 20. April 2011
Samstag, 22. Januar 2011
CU3 for BizTalk Server 2006 R2 SP1
In the end of 2010 Microsoft released the third cumulative update package for BizTalk Server 2006 Service Pack 1.
You do not need prior update packages to apply this. If you are not affected by any problems Microsoft recommends to wait for the next Service Pack release.
CU1 for BizTalk Server 2009
A few days ago, Microsoft released the first cumulative update package for BizTalk Server 2009
If you are not affected by any problems Microsoft recommends to wait for the next Service Pack release.
Freitag, 22. Oktober 2010
Replace Text in Streams
Today, I thought about replacing text in streams. I noticed that .NET 4 provides methods for type
Stringto replace some text, but no methods for type
StreamI found a way by converting the stream to a string in a first step and by replacing text in a second step.
new StreamReader(i).ReadToEnd().Replace("old text", "new text")For a lot of cases this is alright and there is nothing to worry about. But if the source is a huge amount of data and I do not want to hold it in memory all the time, things get tricky. For these cases I wrote a simple method called
ReplaceTextInStream
The method gets four arguments: an input stream, an output stream, a string with a pattern to search for and a string with the replacement value. If one argument is null, a ArgumentNullException is thrown. Here is the code: Enjoy!
public static void ReplaceTextInStream(Stream input, Stream output, string pattern, string replacement)
{
if (input == null)
{
throw new ArgumentNullException("input");
}
if (output == null)
{
throw new ArgumentNullException("output");
}
if (pattern == null)
{
throw new ArgumentNullException("pattern");
}
if (replacement == null)
{
throw new ArgumentNullException("replacement");
}
StreamReader r = new StreamReader(input);
StreamWriter w = new StreamWriter(output);
// Input and Pattern are empty => Output = Replacement
if(input.Length == 0 && pattern.Length == 0)
{
w.Write(replacement);
}
// Pattern is empty => Output = Input
if (input.Length != 0 && pattern.Length == 0)
{
while (!r.EndOfStream)
{
w.Write((char)r.Read());
}
}
// Init empty Stack
List<char> stack = new List<char>();
// Loop over input characters
while (!r.EndOfStream)
{
// Read next input character
char c = (char)r.Read();
// Compare characters
if (pattern[stack.Count] == c)
{
// Match => Put it on Stack
stack.Add(c);
// Match complete?
if (stack.Count == pattern.Length)
{
// Write Replacement and clear Stack
w.Write(replacement);
stack.Clear();
}
}
else
{
// No Macth => Stack filled?
if (stack.Count != 0)
{
// Write and Clear Stack
foreach (var tc in stack)
{
w.Write(tc);
}
stack.Clear();
}
// Copy current character
w.Write(c);
}
}
// After Loop: Stack filled?
if (stack.Count != 0)
{
// Write and Clear Stack
foreach (var tc in stack)
{
w.Write(tc);
}
stack.Clear();
}
w.Flush();
}
Useful .NET Tools
Here is a list of tools I use for .NET development. Each of them saves me a lot of time.
JetBrains ReSharper
Resharper is an extension by Jetbrain for Visual Studio, which improves the development experience. ReSharper executes solution-wide static code analysis, error detection on-the-fly, without the need to compile, provides additional features for error correction, code completion, navigation, search, refactorings, syntax highlighting, formatting, code generation and optimization among other features.
Download
redgate .NET Reflector
.NET Reflector is a class browser and analysis tool for .NET. It allows you to navigate, search, disassemble and analyze .NET components.
Download
WinMerge
WinMerge is a powerful differencing and merging tool. It’s Open Source. WinMerge can compare folders and files, presenting differences in a visual text format that is easy to understand and handle.
Download
Instant SQL Formatter
Online tool for formatting SQL statements. Supported database types are MSSQL, Oracle, DB2, MySQL and others
Link
C# Regular Expression Helper
Litte tool for testing regular expressions
Download
XPath Tester
Little tool for testing XPath statements
Download
Freitag, 8. Oktober 2010
Resumed Orchestration Instances are not processed
Missing Restart Msg in Spool table (can prevent some svc instances to be resumed, terminated or suspended) !!
Missing Suspend Msg in Spool table (can prevent some svc instances to be resumed, terminated or suspended) !!
Missing Terminate Msg in Spool table (can prevent some svc instances to be resumed, terminated or suspended) !!
Missing ResumeInDebugMode Msg in Spool table (can prevent some svc instances to be resumed, terminated or suspended) !!
Following the hint to run the Terminator tool is not necessary. Just do THIS. Afterwards, restart the host instances. All running, but not processed orchestration instances are processed.
Sonntag, 3. Oktober 2010
BizTalk Server 2010 released
Links:
Download BizTalk Server 2010 - Developer Edition
Download BizTalk Server 2010 - Evaluation Edition
MSDN Library on BizTalk Server 2010