I have been trying to deploy my web apps on Windows server 2003 that are running on windows server 2000 currently. I deployed the COM dlls in COM+ on the new server by creating an empty package and configuring localservice account as identity. When I tried to run my applications i detected an error that never occured on Win2k.
I am returning a reference to a connection object from the dll to the asp page. On the asp page, when I try to set activeconnection property of a command object, I get error 3001 "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another"
The code in my dll("ALJLibrary.DataInsert") is as follows
Public Function ConnectDB(ByVal appName) As ADODB.Connection
On Error GoTo ErrHand
Set oCn = New ADODB.Connection
oCn.ConnectionString = getConstr(appName)'gets connection string from the registry for the corresponding Application
Set ConnectDB = oCn
Err.Raise Err.Number, Err.Source, Err.Description
Set ConnectDB = Nothing
The code in my asp client is as follows
Set oDataUtil = Server.CreateObject("ALJLibrary.DataInsert")
Set oCn = oDataUtil.ConnectDB("SalesForecast")
Set oCmd = CreateObject("Adodb.command")
Set oCmd.activeConnection = oCn (This line generates the error 3001 "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another")
I tried recompiling the dll on a Windows 2003 server to rule out any dependancy issues because I detected that there was a change in version of COMSVCS.dll and also I reset reference to ADO 2.8.
I am not using role based authentication nor am I trying to invoke the components across machine boundary.
Also, I have observed that when I set the COM+ application as a library package then the same code works without any issues.
This indicates that something goes wrong when my asp page tries to get a reference to connection object for the activeconnection property of the command object across process boundary.
Although, I am able to get a reference to the connection object and even use the connection object to execute queries i.e. oCn.execute (I tried that in simulated environment), the problem occurs only when I try to set activeconnection property of the command object. I have been trying to resolve this issue since the past week and so far I have been unable to find any documentation reporting this error.