I have the C# Dll (ABService) deployed in COM + and my os Is windows 2008.
I have given the strong name for this dll and its dependent dll’s
When I access the method of this dll through localhost or if I add the reference to the client project the method are executed successfully. Simply if I access the dll from the same machine with the reference it is working. So I think there is no problem with the way I deployed in the COM +. I have the doubt whether I have the problem in OS and Visual Studio 2008 combination.
I have built all the dll with the Visual Studio 2008 with Target cpu as x86 and targert framework as 2.0.
I have given in below the codes I have tried with and the errors.
I need to create the object for the dll in server machine(64 bit) and access its method from the client(32 bit)
Code :
Type svr = Type.GetTypeFromProgID("ABService.Service", strserver1url[2],false);
ABService.Service service1= (ABService.Service)Activator.CreateInstance(svr);
strresult = service1.ExecuteService(orequest.xml);
Error :{"Retrieving the COM class factory for remote component with CLSID {77BF00E0-41AC-3967-9E72-A4927CC0B880} from machine 10.105.138.64 failed due to the following error: 80040154."}
Code
Type svr = Type.GetTypeFromProgID("ABService.Service", strserver1url[2],true);
object Service1 = null;
Service1 = (ABService.Service)Activator.CreateInstance(svr, true);
strresult = Convert.ToString(ReflectionHelper.Invoke(Service1, "ExecuteService", new object[] { orequest.xml }));
Service1 = null;
Error: Retrieving the COM class factory for remote component with CLSID {77BF00E0-41AC-3967-9E72-A4927CC0B880} from machine ftpsite failed due to the following error: 80040154.
With the below code instead of C#.Net dll if i have the vb dll in Com + the method is executed successfully.
Code
ords = new RDS.DataSpace();
ords.InternetTimeout = 600000;
object M_Service = null;
ABService.Service oabservice = null;
M_Service = ords.CreateObject("ABService.Service",url);
strresult = Convert.ToString(ReflectionHelper.Invoke(M_Service, "ExecuteService", new object[] { orequest.xml }));
Error : {"Object doesn't support this property or method 'ExecuteService'"}
Code
object obj=Interaction.CreateObject("ABService.Service", "10.105.138.64");
strresult = Convert.ToString(ReflectionHelper.Invoke(obj, "ExecuteService", new object[] { orequest.xml }));
Error: {"Cannot create ActiveX component."}
Code
object obj = Activator.GetObject(typeof(ABService.Service), @"http://10.105.138.64:80/ABANET");
strresult = Convert.ToString(ReflectionHelper.Invoke(obj, "ExecuteService", new object[] { orequest.xml }));
Error:
InnerException {"The remote server returned an error: (405) Method Not Allowed."} System.Exception {System.Net.WebException}
Message "Exception has been thrown by the target of an invocation.”