Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • 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
    oCn.Open
    Set ConnectDB = oCn
    Exit Function
ErrHand:
    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
0
iloya
Asked:
iloya
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:
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/TechRef/6f8a7c80-45fc-4916-80d9-16e6d46241f9.mspx

... and a good tutorial how to set up Active Directory on Windows 2003 Server can be found at:
http://www.petri.co.il/how_to_install_active_directory_on_windows_2003.htm

... 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:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=9688f8b9-1034-4ef6-a3e5-2a2a57b5c8e4

... and a tutorial for "ADAM":
http://www.serverwatch.com/tutorials/article.php/3080681

... and another tutorial with sample scripts to Scripting Exchange Using VBScript and ADSI at:
http://www.serverwatch.com/tutorials/article.php/3080681
0
 
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.  
0
 
Irwin SantosComputer Integration SpecialistCommented:
what happens if you use the IIS user guest account?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Melih SARICAIT ManagerCommented:
ur problem is about the activeconnection Property ..

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

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdproactivecon.asp
0
 
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
0
 
GranModCommented:
PAQed with points refunded (500)

GranMod
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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