473,791 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB-WEB: Problem with COM after transforming it from VB6 to .NET

3 New Member
Hi all,

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.CreateO bject" 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
  1. Function CreateFolder(ByVal Root As String, ByVal Path As String) As Integer
  2.     Dim fsoFiles As COMFiles.Files
  3.     fsoFiles = New COMFiles.Files
  4.  
  5.     If Not fsoFiles.FolderExists(Root & Path) Then
  6.         ....
  7.     End If
  8.  
  9.     fsoFiles.Dispose()
  10.     fsoFiles = Nothing
  11. End Function
The function called in COMFiles uses Scripting.FileS ystemObject and is as follows:

Expand|Select|Wrap|Line Numbers
  1. Public Function FolderExists(ByVal MyDir As String) As Boolean
  2.     Dim fso As Scripting.FileSystemObject
  3.     fso = New Scripting.FileSystemObject
  4.     FolderExists = fso.FolderExists(MyDir)
  5.     fso = Nothing
  6. End Function
The error that occurs when I call fsoFiles.Folder Exists() in COMTasks is:

Cannot load type 'COMFiles.Files , COMFiles, Version=1.0.288 0.28712, Culture=neutral , PublicKeyToken= 1b21fcebb0ef5fe c'

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 FileSystemObjec t, 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
Nov 27 '07 #1
0 926

Sign in to post your reply or Sign up for a free account.

Similar topics

132
5799
by: Kevin | last post by:
I don't know if I should even start this topic but here goes. I'm an ex vb6 developer, now developing in C#. The reason why I started developing in C# is because the company that I worked for at the time standarised on C#. Many of my friends working in previous companies that I worked for are starting to move back to VB.Net. When I asked them why, it seems that the next release of VB.Net seems very promising and they kinda see...
9
3127
by: Stanley | last post by:
I have a class "clsABC" which is created by VB.NET. I am trying use it in the C# program. Although I can add it in the project reference, I can't browse the methods and properties in the coding. Please see the following coding: using clsABC clsABC tmpClass = new clsABC(); tmpClass. <------ I can see any methods and properties.
6
9458
by: VB Programmer | last post by:
I have a line of code in my project: mobjText.Append(ChrW(Bytes(iIndex))) I took out the reference to Microsoft.VisualBasic in my imports so that I am forced to use all VB.NET stuff. What is the replacement for the ChrW function? Thanks, Robert
8
1805
by: Andy | last post by:
Are there any information about the big differences between VB 2003 and VB 2005 available? /A.
9
8984
by: Kimelia Schiles | last post by:
Hi, I am new to C#, and I am a VB programmer. I would like to know whether there is any function in C# that can is similar to IsNumeric in VB?
8
1710
by: marcwentink | last post by:
To my surprise Visual Studio 8 - VB evaluates C_B in if C_A And C_B Then And Hence if C_B is an expression that can only be validated if C_A is true my code crashes. For example If p_EdType <"" And CLng(p_EdType) 0 Then ..... There is no Conditional-And operator in Visual Basic?
3
1819
by: Dhananjay | last post by:
Hi All, I am facing problem when i am converting C#.net code(Delegate concept) into vb.net. I am unable to do that . Can someone help me to solve the problem. I am providing my C#.net code. ==================================my code is :- ====================================== static public List<MembershipUserWrapperGetMembers(bool
25
2064
by: Andy B | last post by:
How hard/easy is it to use/learn VB compared to c#?
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.