My application uses ASP and several COM objects. The communication between ASP and the COMs works perfectly, and I have no errors when I call "Server.CreateObject" from ASP.
The problem lies in specifically one of my COMs. What I am trying to do is transform my COMs from VB6 to .NET. So far it has been going well. I managed to do most of them. One of my .NET COMs, COMTasks, has a function that calls another function in a COM called COMFiles. I successfully transformed COMTasks to .NET.
When COMFiles was still in VB6, the communication was working perfectly between the 2, even after I transformed COMTasks to .NET. However, now I am trying to transform COMFiles to .NET, and for some reason I am not able to make it work.
Here is the code in COMTasks (.NET):
Expand|Select|Wrap|Line Numbers
- Function CreateFolder(ByVal Root As String, ByVal Path As String) As Integer
- Dim fsoFiles As COMFiles.Files
- fsoFiles = New COMFiles.Files
- If Not fsoFiles.FolderExists(Root & Path) Then
- ....
- End If
- fsoFiles.Dispose()
- fsoFiles = Nothing
- End Function
Expand|Select|Wrap|Line Numbers
- Public Function FolderExists(ByVal MyDir As String) As Boolean
- Dim fso As Scripting.FileSystemObject
- fso = New Scripting.FileSystemObject
- FolderExists = fso.FolderExists(MyDir)
- fso = Nothing
- End Function
Cannot load type 'COMFiles.Files, COMFiles, Version=1.0.2880.28712, Culture=neutral, PublicKeyToken=1b21fcebb0ef5fec'
Both COMs are created as "Server Application" in component services, and have the proper security configuration.
I tried pasting the function FolderExists inside COMTasks and call it, and it worked fine. So I am sure the error is not from the FileSystemObject, it is really a communication problem between the 2 COMs.
How come this same code worked perfectly when COMFiles was in VB6, and I am having this error now?
I have spent several days on this issue and I would really appreciate any help.
Thank you
Bob