Results 1 to 2 of 2
Thread: Strange question on CreateObject
Dec 10, 2011, 17:08 #1
Strange question on CreateObject
Basicly, what happened to the CreateObject(pid, host) version of this method in .NET 4.0 C#? I can't seem to locate any information at all on how to instantiate a COM+ service located on a remote server. The current version is HttpContext.Current.Server.CreateObject(pid) or (type), but you can't specify host. My guess is that I need to instantiate a HttpServerUtility for the required server, but I have no clue how to go about that. Any ideas?
Dec 12, 2011, 01:05 #2
For those interested, the answer is:
// get a type by asking the remote server for it Type type = Type.GetTypeFromProgId("Foo.Bar.Thing", "220.127.116.11"); // then instantiate it with the reflection activator IFooBarThing thing = Activator.CreateInstance(type) as IFooBarThing;
Aparently, things just got moved around. The functionality is still there.