ODP.NET – “Pooling” and “Connection request timed out”

Oracle - Pooling - smallRecently, I had to look at an issue in our code regarding “Connection request timed out”. Our Oracle connections are set to use the Pooling service offered by ODP.NET. Oracle documentation as the following description:

“The Max Pool Size attribute of the ConnectionString property sets the maximum number of connections for a connection pool. If a new connection is requested, but no connections are available and the limit for Max Pool Size has been reached, then the connection pooling service waits for the time defined by the Connection Timeout attribute. If the Connection Timeout time has been reached, and there are still no connections available in the pool, the connection pooling service raises an exception indicating that the connection pool request has timed-out.” [Ref-01, p3-6]

(more…)

Advertisement

Excel DNA

Recently I was looking at technologies for “Excel Addins” and come across “Excel DNA” (used by some of my colleagues). It is a free framework with a very permissive open-source license.

My need was to be able to consume a WCF service (.NET 3.0) from some VBA code in Excel 2007. Excel-DNA helped to make the final solution very easily. I did a prototype (more…)

Layer model diagram – a new way to view and test your Application

Layer diagram sample Happy new year to all !!

First post of the year – On my “2011 year To-dos list”, I have got “Make at least one post per month”. We will see.

I already mentioned the new Layer model diagram in Visual Studio 2010 on a previous post (TechEd 2010 – Day #3). At the time I created a model diagram using one of my current projects (SteelVersion) and here is the result: (more…)

TechEd 2010 – Day #3

Visual Studio 2010I started the day with the session presented by Peter Provost about “Architecture Discovery with Visual Studio 2010 Ultimate”.

He did a demo on the dependency feature –  a great visual way to look at your code and navigate through it. The dependency file format is XML, more specifically DGML (Directed Graph Markup Language).

He went on presenting the “Layer model diagram”. I never used it before, but definitely I will. As an Architect you can now draw “boxes and lines” in a diagram that can not only be used to communicate with the team, but also use it to validate your architectural design at compilation time. (more…)

How to debug a remote process

Introduction

(original blog entry)

Visual Studio supports remote debugging from one computer to another. When you are doing remote debugging, the host computer can be any platform that supports Visual Studio. The remote computer can be a 32-bit (, Windows 2000, Windows XP, or Windows Server 2003) or 64-bit (IA64, IA64 WOW mode, x64, or x64 WOW mode) platform. (more…)

Configure KDiff3 in Visual Studio

(original)

KDiff3 is a very good comparison and merging tool (You can find it at http://kdiff3.sourceforge.net/). For merging operations bewteen two branches, it allows to see the 3 source views : “base view” (or common ancestor view), “your local branch view” and the “target view”. Also, at the bottom, it displays the final result in the “merged view”. (more…)

How to Debug the Installation/Uninstallation of Windows Service (.NET)

(original blog entry)

Just setup in your “Debug” tab of your Visual Studio “Windows Service” project:

  • Select “Start external program” and find “InstallUtil.exe” (usually under <Windows>\Microsoft.NET)
  • Then as command line argument put the name of your executable
  • As a working directory, select the output folder of your project

It should look like this:

 

Setup the breakpoints and hit F5. The installation should start and stop at your breakpoint.

If you want to debug uninstallation of your Windows Service (.NET), use the “/u” argument of InstallUtil.exe.

If the debug session is aborted (because you stopped it in the middle or an error arose) , then the service might not be completely installed or removed. If that is the case, just open a command line window and type in:

>InstallUtil.exe /u <path:filename of your .NET executable>

Good debug session.

Security Measures to take into account when designing web sites

(original)

Here are a few measures in order to secure a web site:

  • Always create at least two network boundaries:
    1. A DMZ (i.e. Front-end machine area)
      • Web servers mainly, but it could have other machines used for communication, as long as:
        • No customer data should be hold in this network boundary
        • Machines in this boundary can only talk to machine on the next level down if that machine does not hold any confidential data (e.g. Customer Data, Partners data, Employees data, etc..)
    2. A Back-end machine area (more…)

IIS – Web issue – “Global.asax could not be loaded”

(I had this issue back on 10 April 2006 – original blog entry)

This blog is to raise awareness of new security features in Windows XP SP2 and 2003 SP1 which are not always very visible through the different tools (e.g. Internet Explorer, Windows Explorer, …), but can make applications fail silently without warnings or events being logged. (more…)

BizTalk SQL Receive Adapter – where to host it?

Currently, I am working on a BizTalk Server 2006 solution and I came across an interesting point about how a SQL receive adapter should be hosted.
Bytheway, I am not the only one with this scenario ; Richard Seroter posted the same issue on his blog, “BizTalk SQL Adapter Advice Requested” (http://blogs.msdn.com/richardbpi/archive/2005/11/22/496020.aspx) .
So, the scenario involves at least two physical servers, each one hosting the same biztalk host, e.g. “host1”. Host1 host many things, and in our case it is the one hosting a SQL receive adapter, e.g. SQL_R1.
The main function of SQL_R1 is to call a stored procedure on a production database, see whether or not there is any work to be picked up. If there is some, then it returns the TOP 10 records (or whatever), and set a flag. All of this is happening inside a distributed transaction (assuming that the production DB is on a different server than the BizTalk MessageBox DB):
– Our production table is enlisted in that transaction
– The BizTalk messagebox which will receive the message is also enlisted in that transaction
Under some circunstances (e.g. loads), a concurrency issue arises: one of the instance of SQL_R1 will have its transaction process terminated by the Resource manager on the production DB server (this is due to lock issues). Ok. this might raise some warnings on the BizTalk server hosting that SQL_R1 which had the error, but the real issue is that after a number of errors raised on the receive location for  SQL_R1, Biztalk will disable that receive location and both instance of SQL_R1 will stop running.
At the moment, the solution I implemented is as follow:
– Create a new host to host the SQL receive adpater.
– Create two host instance (in-process) – one per server (set “do not start” on one of the server).
– Allow the SQL adpter’s receive function to be hosted by the new host.
– Change the setting of the SQL_R1 in my Application to use the new “receive handler host”.
Pros and Cons:
+ we do not have anymore the SQL recieve adapter disabled by BizTalk (the transaction is not anymore terminated)
– We have lost the “automatic failover” facility  on the SQL receive adapter. Now, when the server hosting SQL_R1 is down, we need manually to  start the second host instance for SQL_R1 on the second BizTalk server.
I will carry on searching for other solution/implementation for this scenario.
%d bloggers like this: