Re: Error 1829 from a Webservice




Hi,

I did try a WebService with IIS 5.1 using Visual Studio 2003 on WinXP. Did
not have any issues at all. Here is a code snippet...
I will try with IIS 6.0 and respond.


[WebMethod]
public string getCustDetail(int custId)
{
string OutString = " ";
string ConnStr =
"Server=ol_ibm_thinkvg;DataBase=stores_demo;User ID=xxx;Password=xxx";
string SqlCmd = "SELECT fname, lname FROM customer
where customer_num=?";

IfxConnection ifxConn = new IfxConnection(ConnStr
);
ifxConn.Open();
IfxCommand selCmd = new IfxCommand(SqlCmd,ifxConn
);

selCmd.Parameters.Add("customer_num",custId);

IfxDataReader dr = selCmd.ExecuteReader();

while(dr.Read())
{
OutString = dr.GetString(0) + " " + dr.
GetString(1);
}

dr.Close();
ifxConn.Close();

return(OutString);
}


Venkatesh.






jparagg@xxxxxxxxx
Sent by: owner-informix-list@xxxxxxxx
11/10/2005 02:40 AM
Please respond to jparagg

To: informix-list@xxxxxxxx
cc:
Subject: Re: Error 1829 from a Webservice


Hello,

Thanks for your reply.
Yes, I forgot to mention I am on IIS 6.0.

By "It fails in webservice" I mean, only the connection.
It is something like

Scenario that fails is :
webservice function
--> calls a DLL function
--> DLL internally connects to db
-->Here before connecting to db, I dumped the environment
variables to a text file (from the DLL itself).
--> The text file shows proper variables and other debug messages
but connection returns -1829

Scenario that works is :
Sample application in delphi.
--> calls (the same) DLL function
--> DLL internally connects to db
--> Dumping the environment variables to the text file (from the
DLL itself).
--> The text file shows proper variables and other debug messages
also the connection returns success and function returns required data

I will try your suggestion to write dummy C# DLL to check whether the
enviornment variables are same...

Thanks and regards

jpar
sending to informix-list
.



Relevant Pages

  • Re: Error 1829 from a Webservice
    ... By "It fails in webservice" I mean, only the connection. ... --> DLL internally connects to db ... --> calls DLL function ...
    (comp.databases.informix)
  • RE: Error calling VB6 DLL from .Net WebService
    ... It appears that when using a VB6 DLL from .Net ... > The WebService runs in its own Application Pool on IIS. ... > The problem is that intermittantly when calls are made to the Web Service ... > the Application Pool that the WebService runs under in IIS. ...
    (microsoft.public.dotnet.framework.interop)
  • Many, many thanks
    ... Assuming that you instantiate the object in the dll on a .asp page, ... if you want to keep a dll loaded in IIS you have a couple ... my ole server dll was exposed. ...
    (microsoft.public.inetserver.iis)
  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... we will be introducing the ability to configure IIS to run under ... and under the 32bit command line no error is thrown. ... the problem must be to do with how the dll is registered. ... > You should be able to reproduce your situation outside of ASP by creating ...
    (microsoft.public.inetserver.iis)
  • Re: Calling unmanaged code from ASP.NET in IIS7
    ... Did you restart IIS after making changes to the security settings. ... Without the actual DLL, ... It works on my dev box if I run the website through Visual Studio using ... Strange thing is if I try to reference a system dll, ...
    (microsoft.public.inetserver.iis)