als
07-16-2007, 06:54 PM
Hi,
Not sure whether it is a bug.
I am trying to get the Calculator example to work with COM+ services. I've got it working in the scenario where the client and the server deployed on one machine. The problem begins when I deploy server component on a separate machine and try to access it remotely.
Here is how I deployed it (.Net Framework 1.1, VS.2003):
On Server machine:
1. Copied output of the Spring.Calculator.RegisterComponentServices.2003 to remote machine and registered it via Spring.Calculator.RegisterComponentServices.exe.
2. In the COM+ services changed the folowing:
- Unchecked the "Enforce access checks..." in the security tab
- Selected "Network Services..." in the Identity tab
3. Exported Calculator App as a proxy
On Client Machine: Installed Calculator Server Proxy generated in step 3 into COM+.
So far so good. Then I tried to run the client and got the following error:
"Spring.Objects.Factory.ObjectCreationException: Error creating object with name
'' : IFactoryObject threw exception on object creation. ---> System.IO.FileNotFo
undException: The system cannot find the file specified... "
I've noticed that the error was coming from this statement in the ServicedComponentFactory:
private object CreateInstance()
{
object instance = Activator.CreateInstance(componentType);
...
}
The componentType at that point was set to "System.__ComObject" whether in the scenario where the client and the server were deployed on one machine it was set correctly to "calculatorComponent".
I've also noticed that the componentType was being set using the following statement:
componentType = Type.GetTypeFromProgID(Name, Server);
Not sure if this is the cause of the problem but I remember that I've read somewhere that the Type.GetTypeFromClsid should be used in the case of the accessing remote COM+ objects.
Any suggestons would be much appreciated.
Thank you.
P.S. The deployment process that I used above proved to be working as I used it to deploy the calculator-like sample without involving Spring and everything worked fine for both local and remote access.
Not sure whether it is a bug.
I am trying to get the Calculator example to work with COM+ services. I've got it working in the scenario where the client and the server deployed on one machine. The problem begins when I deploy server component on a separate machine and try to access it remotely.
Here is how I deployed it (.Net Framework 1.1, VS.2003):
On Server machine:
1. Copied output of the Spring.Calculator.RegisterComponentServices.2003 to remote machine and registered it via Spring.Calculator.RegisterComponentServices.exe.
2. In the COM+ services changed the folowing:
- Unchecked the "Enforce access checks..." in the security tab
- Selected "Network Services..." in the Identity tab
3. Exported Calculator App as a proxy
On Client Machine: Installed Calculator Server Proxy generated in step 3 into COM+.
So far so good. Then I tried to run the client and got the following error:
"Spring.Objects.Factory.ObjectCreationException: Error creating object with name
'' : IFactoryObject threw exception on object creation. ---> System.IO.FileNotFo
undException: The system cannot find the file specified... "
I've noticed that the error was coming from this statement in the ServicedComponentFactory:
private object CreateInstance()
{
object instance = Activator.CreateInstance(componentType);
...
}
The componentType at that point was set to "System.__ComObject" whether in the scenario where the client and the server were deployed on one machine it was set correctly to "calculatorComponent".
I've also noticed that the componentType was being set using the following statement:
componentType = Type.GetTypeFromProgID(Name, Server);
Not sure if this is the cause of the problem but I remember that I've read somewhere that the Type.GetTypeFromClsid should be used in the case of the accessing remote COM+ objects.
Any suggestons would be much appreciated.
Thank you.
P.S. The deployment process that I used above proved to be working as I used it to deploy the calculator-like sample without involving Spring and everything worked fine for both local and remote access.