• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

Problem with ADO and COM+ while trying to migrate ASP application on Windows Server 2003 from Win2k

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
    Exit Function
    Err.Raise Err.Number, Err.Source, Err.Description
    Set ConnectDB = Nothing
End Function

The code in my asp client is as follows
Dim oCmd
Dim oCn
Dim oDataUtil
Sub MakeConnection
    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")
End Sub

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.
Please help
1 Solution
Irwin SantosComputer Integration SpecialistCommented:
First...can you confirm the obvious?
Is ASP "allowed" under web extensions?  If so, does it have the same permissions/security as you had in 2k?

NEXT..some info for you to review....

Here is a Raisor solution from PAQ:
You'll get a lot of information at:

... and a good tutorial how to set up Active Directory on Windows 2003 Server can be found at:

... you might also want to read about "ADAM", which is a part of Microsoft’s fully integrated directory services available with Windows Server 2003, and which is built specifically to address directory-enabled application scenarios:

... and a tutorial for "ADAM":

... and another tutorial with sample scripts to Scripting Exchange Using VBScript and ADSI at:
iloyaAuthor Commented:
Thanx.  I have actually confirmed that asp is an allowed extension and also that security configuration is same as that of existing deployment on Win2k.  Infact asp pages are running well except for the fact that I get an error when the code set oCmd.ActiveConnection = oCn is executed.  
Thank you for the links but I guess my problem is not Active Directory since the server I am working on is a member server and I have administrative access to this server.  The code doesnt work even if I set package identity to interactive with me as active user.  
Irwin SantosComputer Integration SpecialistCommented:
what happens if you use the IIS user guest account?
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Melih SARICAOwnerCommented:
ur problem is about the activeconnection Property ..

read this link carefuly for Active connection property ..
Sets or gets what kinda data ...

iloyaAuthor Commented:
I have been able to reoslve the problem on my own and I found out that none of the answers posted are relevant.  I discovered that there is a version change of COMSVCS.dll, the main COM+ runtime and so I tried to recompile my dlls on a windows 2003 server.  However this also failed so I had to do with a workaround by creating standalone connections in my pages rather than getting a reference to the connection object being returned from my COM components.  I guess that the gradual transition of ADO to ADO.Net has much to contribute in this and soon this problem would be highlighted
PAQed with points refunded (500)

Community Support Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now