This code is written in WCF. when I add reference from localhost then this code works fine but when service reference is added from IIS then it fails in cn.Open() . It doesn't throw any exception and just hangs in this line.
OdbcConnection cn = new OdbcConnection();
cn.ConnectionString = "DSN=myDsn;Uid=myuid;Pwd=mypassword;";
cn.Open(); // Fails on this line
Or is there any other way which which I can get datasource name with dsn in C#?