Remote Application (Proxy)
-
I know that .NET MUST to have a way to do this. But I don't know how. 1)On COM+, we can install a Component Server on a machine and our application on another. Then on the application Server we can access dll's running over Component Server and the our dll access de DB. There's a way to do it in C#? 2)I read some about MarshallByRef, some proxy dll samples (that doesn't work because it needs a physical path like d:\dlls\mydll.dll or a shared folder). 3)Can anybody help me? Please a step-by-step explaining how to do this.... thank you guys!!! Wender Oliveira .NET Programmer
-
I know that .NET MUST to have a way to do this. But I don't know how. 1)On COM+, we can install a Component Server on a machine and our application on another. Then on the application Server we can access dll's running over Component Server and the our dll access de DB. There's a way to do it in C#? 2)I read some about MarshallByRef, some proxy dll samples (that doesn't work because it needs a physical path like d:\dlls\mydll.dll or a shared folder). 3)Can anybody help me? Please a step-by-step explaining how to do this.... thank you guys!!! Wender Oliveira .NET Programmer
You can still use COM+ using
System.EnterpriseServices
classes in .NET, and there's always Web Services and .NET Remoting, all of which are discussed in many articles here on CodeProject. .NET Remoting is arguably the best route to go with .NET applications (use Web Services if you want to support legacy clients and clients on other platforms (like Java)). To get an overview of remoting, read the .NET Remoting Overview[^]. A couple of good books to read about .NET Remoting are "Microsoft .NET Remoting" from MS Press[^] and "Advanced .NET Remoting" by Ingo Rammer[^] (the former is probably better if you're new to .NET Remoting). BTW - this isn't specific to C# but is available to all .NET implementations, and you don't need the path to an assembly (the proxy, in this case) so long as the assembly is resolvable (like in the GAC if it is strongly named, and all assemblies should be). Read How the Runtime Locates Assemblies[^] for more information on assembly resolution. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] -
You can still use COM+ using
System.EnterpriseServices
classes in .NET, and there's always Web Services and .NET Remoting, all of which are discussed in many articles here on CodeProject. .NET Remoting is arguably the best route to go with .NET applications (use Web Services if you want to support legacy clients and clients on other platforms (like Java)). To get an overview of remoting, read the .NET Remoting Overview[^]. A couple of good books to read about .NET Remoting are "Microsoft .NET Remoting" from MS Press[^] and "Advanced .NET Remoting" by Ingo Rammer[^] (the former is probably better if you're new to .NET Remoting). BTW - this isn't specific to C# but is available to all .NET implementations, and you don't need the path to an assembly (the proxy, in this case) so long as the assembly is resolvable (like in the GAC if it is strongly named, and all assemblies should be). Read How the Runtime Locates Assemblies[^] for more information on assembly resolution. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]Thanks Heath, I'm reading this Remoting overview. But, let me try to explain a few better. I know that maybe you will say to ask it on ASP.NET forum. I have an web application and for security reasons I need to access my components (layers) on another machine... My Web application will talk to a dll on my component server and this dll will talk with my db and return the result to my web application. How to do this with an easy way? At suffering times, with vb, it would be possible by adding a dll on component service and making its msi instalation and adding a refference to that dll on web application. This is made with connection spool, ssl, authentication, etc... Do you know if exists some way to do this with C#.NET dlls? Wender Oliveira .NET Programmer
-
Thanks Heath, I'm reading this Remoting overview. But, let me try to explain a few better. I know that maybe you will say to ask it on ASP.NET forum. I have an web application and for security reasons I need to access my components (layers) on another machine... My Web application will talk to a dll on my component server and this dll will talk with my db and return the result to my web application. How to do this with an easy way? At suffering times, with vb, it would be possible by adding a dll on component service and making its msi instalation and adding a refference to that dll on web application. This is made with connection spool, ssl, authentication, etc... Do you know if exists some way to do this with C#.NET dlls? Wender Oliveira .NET Programmer
You implement shared interfaces in separate DLLs with very little implement. Implement those interfaces in your Remoting DLL then consume those interfaces in your client (proxy). Again, for how the runtime locates assemblies, see the last link I gave you in my previous post. Either one of those books will help explain Remoting better, since it is a very complex subject and the .NET Framework SDK doesn't go indo enough detail to really explain it well. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]