On Wed, Mar 4, 2009 at 07:00, Gareth <gareth.gosl...@gmail.com> wrote:
> The processName field is static so it only needs to be initialized
> once per application domain, during the first connection.
> The GetProcessName() method is static to allow access to the static
> processName field.
> Inside GetProcessName() we check if the processName field is
> initialized or not, if not we do the try/catch otherwise we just
> return the processName field (no try/catch at every new connection,
> only the first one).

Well, there are two problems. First you're using exceptions to guess,
that's running under ASP.NET. But that's not 100% correct. There may
be different reasons for exception (you're not even checking whether
it's security problem). The other one is that your catch blocks are
empty. If there will be exception like OutOfMemoryException, your code
will continue and developer/user will not notice this, and that's
really bad.

I think, only good way is to detect runnning on restricted trust and
then ASP.NET env. to put there i.e. URL.

-- 
Jiri {x2} Cincura (CTO x2develop.com)
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to