Ingres.Client.IngresException with .NET 4.0

294 views
Skip to first unread message

Lasrado, Lester (CSS)

unread,
Sep 13, 2013, 12:20:33 PM9/13/13
to openroa...@googlegroups.com

Hi,

 

The below code worked perfectly fine in C# .NET 3.5

public Boolean TestConnectionString(string value)

        {

            Ingres.Client.IngresConnection iconn = new Ingres.Client.IngresConnection(value);           

            try{

                iconn.Open();

            }

            catch(Exception e)

            {

                throw e;

            }

            finally{

                iconn.Close();

            }

            return true;

        }

Where value is the connectionstring of the form “Server=myserver;Port=IX7;Database=mydb;User ID=lesterl;Password=mypassword;Date_Format=GERMAN”;

 

However after we migrated to C# .NET 4.0

 

The above code fails with the below exception –

************** Exception Text **************

Ingres.Client.IngresException: Communications error while establishing connection.

The requested name is valid, but no data of the requested type was found

SocketException thrown by System.Net.Dns.GetHostByName("10.12.354.44") in resolving the hostname

 

 

************** Loaded Assemblies **************

mscorlib

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)

    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

----------------------------------------

TestConnection

    Assembly Version: 1.0.0.0

    Win32 Version: 1.0.0.0

    CodeBase: file:///D:/TestConnection/TestConnection/TestConnection.exe

----------------------------------------

System.Windows.Forms

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.1 built by: RTMRel

    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System.Drawing

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.1 built by: RTMRel

    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

System

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.296 built by: RTMGDR

    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

Ingres.Client

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.910.15

    CodeBase: file:///D:/TestConnection/TestConnection/Ingres.Client.DLL

----------------------------------------

 

Also this is not a problem in the development and test environments here. This is reported as a production issue which we cannot even replicate at our end.

 

Any help is much appreciated!!

 

Lester Lasrado



This email and any attachment to it are confidential.  Unless you are the intended recipient, you may not use, copy or disclose either the message or any information contained in the message. If you are not the intended recipient, you should delete this email and notify the sender immediately.

 

 Any views or opinions expressed in this email are those of the sender only, unless otherwise stated.  All copyright in any Capita material in this email is reserved.

 

 All emails, incoming and outgoing, may be recorded by Capita and monitored for legitimate business purposes.

 

 Capita exclude all liability for any loss or damage arising or resulting from the receipt, use or transmission of this email to the fullest extent permitted by law.

 

 This message has been scanned for malware by Websense. www.websense.com

Chris Clark

unread,
Sep 13, 2013, 12:29:57 PM9/13/13
to openroa...@googlegroups.com
On Fri, 13 Sep 2013 17:20:33 +0100, Lasrado, Lester (CSS)
<Lester....@capita.co.uk> wrote:
> The below code worked perfectly fine in C# .NET 3.5
>
> publicBoolean TestConnectionString(string value)
>
> {
>
> Ingres.Client.IngresConnection iconn = new
> Ingres.Client.IngresConnection(*/value/*);
>
> try{
>
> iconn.Open();
>
> }
>
> catch(Exception e)
>
> {
>
> throw e;
>
> }
>
> finally{
>
> iconn.Close();
>
> }
>
> return true;
>
> }
>
> Where */value/* is the connectionstring of the form
> �*Server=myserver;Port=IX7;Database=mydb;User
> ID=lesterl;Password=mypassword;Date_Format=GERMAN*�;
>
> However after we migrated to C# .NET 4.0
>
> The above code fails with the below exception �
>
> /************** Exception Text **************/
>
> /Ingres.Client.IngresException: Communications error while
> establishing connection./
>
> /The requested name is valid, but no data of the requested type was found/
>
> /SocketException thrown by
> System.Net.Dns.GetHostByName("10.12.354.44") in resolving the hostname/
>
> /...../
>

This sounds like it could be a network config issue. Does "nslookup
10.12.354.44" show anything (and ping the same address)? Maybe get one
of the network folks to take a look?

I'd be tempted to log a support issue or post to the
forums/comp.databases.ingres

Chris

Lasrado, Lester (CSS)

unread,
Sep 13, 2013, 12:41:35 PM9/13/13
to openroa...@googlegroups.com

Just an update on this after reading this - http://stackoverflow.com/questions/2714449/problem-with-system-net-dns-gethostentrydnsserver-on-net-4-0

Trying the host name instead of the IP address has worked at the customer site.

 

However what is not clear is –

1.     The problem cannot be reproduced in the test and dev environments?

2.     How can we make IP Address passed in the connectionstring work?

 

Cheers

Lester

Click here to report this email as spam.

--
You received this message because you are subscribed to the Google Groups "OpenROAD Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openroad-user...@googlegroups.com.
To post to this group, send email to openroa...@googlegroups.com.
Visit this group at http://groups.google.com/group/openroad-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/openroad-users/0E8E941783C9AC468EA45B27599F38FC06ED0F33%40CAPPRWMMBX09.central.ad.capita.co.uk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages