Monday, April 28, 2008

Performance issue WinXP v Windows 2003 Server

I have identified a performance problem with an ASP.NET application written in VB.Net running in the .Net Framework 1.1.

The application receives details of where a job is to be done and returns a list of possible appointments taking account of existing jobs, resource availability etc. Each appointment day is divided into a number of time slots (e.g. 08:00 to 13:00 etc.) any of which may overlap with any other.

When running on XP the response time is a few seconds. When running the identical source code but recompiled on Windows 2003 Server the response time is three times longer (and sometimes more). Changes to performance settings have been tried but with no effect.

A test environment has been set up with two identical machines one with Windows XP, the other with Windows 2003 Server. No other applications were hosted on the machines.

The data is held on SQL Server but the first thing the program does is read it into a number of ADO.NET DataTables within a DataSet. From then on all the data manipulation is on the DataTables and collections. The main table (with the current jobs) has a few hundred records.

All the collections and DataSets are strongly typed.

High level pseudo code follows.

Build dataset of all existing jobs, resource availability information etc. from SQL Server
For each day in the period
For each slot in day
Build a collection of jobs for the day and slot from the DataSet
Build a collection for resource availability from the DataSet
Do until all the jobs in the collection have been allocated
Do until all the jobs in the collection have a provisional allocation
Make a provisional allocation of the “best” job/resource pair
Loop
Make an allocation of the “best” provisional allocation
Update the collections to reflect the allocation
Update the DataSet to reflect the allocation
Loop
Next slot
Next day
Return a list of allocations

The question is: why does the code take 3 times longer on Windows 2003 Server in comparison with XP?

Thursday, January 3, 2008

.NET Compact Framework 3.5 released

The Microsoft® .NET Compact Framework 3.5 Redistributable contains the common language runtime and class libraries built for the .NET Compact Framework. In addition to version 3.5 support, it also supports applications developed for version 1.0 and 2.0. The .NET Compact Framework 3.5 provides new features such as Windows Communication Foundation, LINQ, SoundPlayer, new runtime tool support, and many other features.

Tuesday, November 20, 2007

.NET Framework 3.5 released

.NET Framework 3.5 builds incrementally on the new features added in .NET Framework 3.0. For example, feature sets in Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF) and Windows CardSpace. In addition, .NET Framework 3.5 contains a number of new features in several technology areas which have been added as new assemblies to avoid breaking changes.

They include the following:
• Deep integration of Language Integrated Query (LINQ) and data awareness. This new feature will let you write code written in LINQ-enabled languages to filter, enumerate, and create projections of several types of SQL data, collections, XML, and DataSets by using the same syntax.
• ASP.NET AJAX lets you create more efficient, more interactive, and highly-personalized Web experiences that work across all the most popular browsers.
• New Web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM, and several new WS-* standards.
• Full tooling support in Visual Studio 2008 for WF, WCF, and WPF, including the new workflow-enabled services technology.
• New classes in .NET Framework 3.5 base class library (BCL) that address many common customer requests.

Monday, November 19, 2007

.NET Framework 2.0 SP1 released

Supported Operating Systems: Windows 2000 sp 4; Windows Server 2003; Windows XP sp 2

Microsoft .NET Framework 2.0 Service Pack 1 provides cumulative roll-up updates for customer reported issues found after the release of Microsoft .NET Framework 2.0. In addition, this release provides security improvements, and prerequisite feature support for .NET Framework 3.0 Service Pack 1, and .NET Framework 3.5.

Thursday, March 8, 2007

.NET Compact Framework 2.0 SP2 released

The Microsoft® .NET Compact Framework 2.0 SP2 Redistributable contains the common language runtime and class libraries built for the .NET Compact Framework. In addition to supporting version 2.0, it also supports applications developed for version 1.0 and service pack releases before version 2.0.

Service Pack 2 of the .Net Compact Framework V2.0 includes some new features in the Remote Performance Monitor aimed at finding memory leaks in the managed heap. These features allow you to take snapshots of the GC heap at any point in time and view the relationships between the live object instances in the heap. You can also compare multiple snapshots over time in order to spot allocation trends in your application as it executes.

Fixed Bugs:
• NETCFRPM fails on x64
• Setup install/uninstall fails silently when the MSI is launched from Control Panel-Programs and Features on Vista
• Finalizers fail on RTF objects because COM bindings are already disposed
• VS crashes on trying to attach without setting the Attach Enabled Registry Key
• Thread.Join() fails with ERROR_INVALID_HANDLE on CE 6.0 platform
• Potential memory corruption caused by circular reference
• JIT assertion failure when non-existent COM port is addressed
• TypeLoadException using generics with NETCF 2.0
• IrDA is broken on Windows CE 5.0 devices
• NetCFRPM and MDBG cannot target headless devices
• SerialPort: Data corruption occurs if DataReceived event is used to receive Unicode characters sent across serial ports
• SerialPort: Cannot open a COM port beyond COM9
• SerialPort: GetPortNames() does not return serial port names beyond COM9
• SerialPort: Data corruption occurs if DataReceived event is used to receive Unicode characters sent across serial ports
• NETCF deadlocks on exit if native callback delegate has been called on native thread
• VS 2005 RTM attempts to deploy NETCFv2.wce5.ARMV4I.cab/System_SR_ENU.cab instead of NETCFv2.wm.ARMV4I.cab/System_SR_ENU_wm.cab on Windows Mobile 6 platforms
• XmlSerializerializationWriter: When GetSpecifiedMember returns false serialization is halted resulting in loss of data
• Access violation marshaling a class with a string field
• Stepping out from a Breakpoint after Func eval causes breakpoint to remain at same place and then VS 2005 hangs
• COM: Access violation in N->M byref marshaling
• Native exception in marshalling code when using Interlocked.Exchange
• Access violation in StubPolicyAlloc (eestub\policy.cpp
• SerialPort.Open thows IOException on CE 6.0 devices
• Type.GetDefaultMembers() doesn't return base type's default members
• Installing multiple locales of same MSI results in multiple instances of NetCF showing up in Add Remove Programs
• VS 2005 attempts to deploy System_SR_ENU.cab instead of System_SR_ENU_wm.cab on Windows Mobile 6 platforms
• Debugger does not correctly handle new native threads entering through COM
• NETCFRPM parses connection string improperly when device uses ipv6
• V2 SP2: HttpWebRequest: HTTPS request fails when TLS_RSA_WITH_3DES_EDE_CBC_SHA cipher is used
• Debugger may AV if breakpoints active before F5
• WebBrowser's NavigatingEventArgs does not allow to cancel navigation
• XmlSerializer fails to deserialize enum's with spaces

Tuesday, November 21, 2006

.NET Framework 3.0 released

The Microsoft .NET Framework 3.0 is the new managed code programming model for Windows®. It combines the power of the .NET Framework version 2.0 with new technologies for building applications that have visually compelling user experiences, seamless communication across technology boundaries, and the ability to support a wide range of business processes. These new technologies are Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation, and Windows CardSpace. The .NET Framework 3.0 is included as part of the Windows Vista™ operating system; you can install it or uninstall it using Windows Features Control Panel. This redistributable package is for Windows XP and Windows Server 2003.

Tuesday, November 7, 2006

SQL Server minor error codes

ValueDescription
28000An internal error has occurred.
28001A read operation from the Internet returned an incorrect number of bytes.
28002A write operation to the Internet wrote an incorrect number of bytes.
28003Either the computer running IIS is out of memory or an incorrect RSCBID was sent in a request.
28004A SQL Server CE Server Agent queue is full and can take no further requests. Try again later.
28005A thread to host the SQL Server Reconciler cannot be started. Check system resources.
28006The SQL Server Reconciler resource DLL cannot be loaded.
28007An internal error has occurred.
28008The transport failed due to incorrect message format or content.
28009An instance of the SQL Server Reconciler cannot be created.
28010An instance of the SQL Server Reconciler error object cannot be created.
28011Authentication failed on the computer running IIS.
28012Authentication failed on the proxy server.
28013The HTTP request failed due to incorrect format or content.
28014This site requires payment before it can be accessed.
28015A Secure Sockets Layer (SSL) connection is required to access this site.
28016The URL cannot be found.
28017An incorrect or unsupported HTTP function call was made.
28018An HTTP function failed to establish a connection to the computer running IIS.
28019The request timed out on the computer running IIS.
28020The computer running IIS returned a Conflict status.
28021The computer running IIS returned a Gone status.
28022An error has occurred on the computer running IIS.
28023The computer running IIS returned a Not Supported status.
28024A gateway error has occurred.
28025The IIS service is not available.
28026The gateway has timed out.
28027HTTPS is not supported on Windows CE 1.1-based devices.
28028Replication is prohibited for this SQL Server CE Server Agent on the computer running IIS.
28029RDA is prohibited for this SQL Server CE Server Agent on the computer running IIS.
28030Internal error: Compression failed.
28031Internal error: Decompression failed.
28032Internet Open failed at the client.
28033The URL syntax is not valid.
28034An Internet connection cannot be established.
28035Header information is either corrupted or missing.
28036An internal or network problem was encountered while trying to close an Internet handle.
28037A request to send data to the computer running IIS has failed. For more information, see HRESULT.
28038The connection was refused by the computer running IIS because the maximum number of RSCBs has been exceeded. Try connecting later.
28039The request was superseded by a subsequent request.
28040The command has been completed. The resent command was ignored.
28041An internal error occurred.