![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am converting a C++ MFC client-server application to C# dotNet and I would like to switch my TCP/IP messages to use dotNet remoting concepts. I can successfully implement many remoting samples, for example from Wrox Press Professional C#. However all of these find have trivial objects that are invoked on the server. None has to access any difficult data values to return to the client. I need to access data maintained by class instances within the server application. Yet the server object instantiated by the remote isn't "connected" to the server application that I can tell. Assembly.GetExecutingAssembly() indicates that the object is running under the object's library dll and Assembly.GetCallingAssembly() returns a windows system dll. In MFC, all I would have to do from a server dll is call AfxGetApp() and recast it to my CMainApp() derived class. Is there an equivalent in dotNet or is there another way I can access the instance of my server? As you may suspect, I am a newbie in C# and dotNet. It might be trivial. |
#3
| |||
| |||
|
|
If you're going from the ground up, I'd go straight to WCF. See my sample here: http://sholliday.spaces.live.com/Blo...842A!158.entry Its not a super-simple example like (you and I both) find alot of times. .. However, the objects that get sent across the wire are ... copies. I'm not sure what you're getting at. Do you want the code to execute on the server? You want the objects to be connected to the server at all times? Check this blog entry as well. http://sholliday.spaces.live.com/Blo...842A!122.entry But I still recommend going to WCF. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:cl07j318asoergdptl23u6morui437ammc (AT) 4ax (DOT) com... I am converting a C++ MFC client-server application to C# dotNet and I would like to switch my TCP/IP messages to use dotNet remoting concepts. I can successfully implement many remoting samples, for example from Wrox Press Professional C#. However all of these find have trivial objects that are invoked on the server. None has to access any difficult data values to return to the client. I need to access data maintained by class instances within the server application. Yet the server object instantiated by the remote isn't "connected" to the server application that I can tell. Assembly.GetExecutingAssembly() indicates that the object is running under the object's library dll and Assembly.GetCallingAssembly() returns a windows system dll. In MFC, all I would have to do from a server dll is call AfxGetApp() and recast it to my CMainApp() derived class. Is there an equivalent in dotNet or is there another way I can access the instance of my server? As you may suspect, I am a newbie in C# and dotNet. It might be trivial. |
#4
| |||
| |||
|
|
On Thu, 8 Nov 2007 17:01:16 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: If you're going from the ground up, I'd go straight to WCF. See my sample here: http://sholliday.spaces.live.com/Blo...842A!158.entry Its not a super-simple example like (you and I both) find alot of times. .. However, the objects that get sent across the wire are ... copies. I'm not sure what you're getting at. Do you want the code to execute on the server? You want the objects to be connected to the server at all times? Check this blog entry as well. http://sholliday.spaces.live.com/Blo...842A!122.entry But I still recommend going to WCF. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:cl07j318asoergdptl23u6morui437ammc (AT) 4ax (DOT) com... I am converting a C++ MFC client-server application to C# dotNet and I would like to switch my TCP/IP messages to use dotNet remoting concepts. I can successfully implement many remoting samples, for example from Wrox Press Professional C#. However all of these find have trivial objects that are invoked on the server. None has to access any difficult data values to return to the client. I need to access data maintained by class instances within the server application. Yet the server object instantiated by the remote isn't "connected" to the server application that I can tell. Assembly.GetExecutingAssembly() indicates that the object is running under the object's library dll and Assembly.GetCallingAssembly() returns a windows system dll. In MFC, all I would have to do from a server dll is call AfxGetApp() and recast it to my CMainApp() derived class. Is there an equivalent in dotNet or is there another way I can access the instance of my server? As you may suspect, I am a newbie in C# and dotNet. It might be trivial. Thanks for the pointer. I did browse through this newsgroup (ms.public.distributed_apps) before posting and saw references (probably yours) to WCF but didn't find much reference to it elsewhere. But I'll take a look. What I want to do is to have the client query the server for data values that relate to various external equipment that the server is communicating with. So the client proxy class has to communicate with the host real class which interrogates the real server app to find out what the current state of that external equipment is. |
#5
| |||
| |||
|
|
The follow the link...that I have at my Remoting Post. He discusses why.....and refers to a "super particle beam" thing in jest. .. But .... you can do the same thing with WCF, via my "WCF Interfaced Development". You're letting the "Host" do the data collecting, and then pushing the collected data to the client. |
#6
| |||
| |||
|
|
The follow the link...that I have at my Remoting Post. He discusses why.....and refers to a "super particle beam" thing in jest. .. But .... you can do the same thing with WCF, via my "WCF Interfaced Development". You're letting the "Host" do the data collecting, and then pushing the collected data to the client. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news 3a7j3p9tpbjsldt4mq22ainphcp08s3hm (AT) 4ax (DOT) com...On Thu, 8 Nov 2007 17:01:16 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: If you're going from the ground up, I'd go straight to WCF. See my sample here: http://sholliday.spaces.live.com/Blo...842A!158.entry Its not a super-simple example like (you and I both) find alot of times. .. However, the objects that get sent across the wire are ... copies. I'm not sure what you're getting at. Do you want the code to execute on the server? You want the objects to be connected to the server at all times? Check this blog entry as well. http://sholliday.spaces.live.com/Blo...842A!122.entry But I still recommend going to WCF. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:cl07j318asoergdptl23u6morui437ammc (AT) 4ax (DOT) com... I am converting a C++ MFC client-server application to C# dotNet and I would like to switch my TCP/IP messages to use dotNet remoting concepts. I can successfully implement many remoting samples, for example from Wrox Press Professional C#. However all of these find have trivial objects that are invoked on the server. None has to access any difficult data values to return to the client. I need to access data maintained by class instances within the server application. Yet the server object instantiated by the remote isn't "connected" to the server application that I can tell. Assembly.GetExecutingAssembly() indicates that the object is running under the object's library dll and Assembly.GetCallingAssembly() returns a windows system dll. In MFC, all I would have to do from a server dll is call AfxGetApp() and recast it to my CMainApp() derived class. Is there an equivalent in dotNet or is there another way I can access the instance of my server? As you may suspect, I am a newbie in C# and dotNet. It might be trivial. Thanks for the pointer. I did browse through this newsgroup (ms.public.distributed_apps) before posting and saw references (probably yours) to WCF but didn't find much reference to it elsewhere. But I'll take a look. What I want to do is to have the client query the server for data values that relate to various external equipment that the server is communicating with. So the client proxy class has to communicate with the host real class which interrogates the real server app to find out what the current state of that external equipment is. |
#7
| |||
| |||
|
|
You may recall that I did admit to being a newbie in dotNet. Of course WCF seems to be dotNet 3.0 and I am currently tied to Visual Studio 2005 and dotNet 2 and don't feel like shelling out another thousand bucks or so just to be that current. My socket TCP/IP messaging has worked well through Dos and C through Windows and C++ and translated easily into dotNet and C#. There is a limit on just how much I am willing to upgrade the infrastructure of the project if it doesn't show up in the user interface where you can far more easily justify the cost. There is always the response "it works now, why should I pay X thousand dollars extra to get the same thing?". Yes, the infrastructure is the most important part, but it is also the hardest to sell. On Thu, 8 Nov 2007 20:56:55 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: The follow the link...that I have at my Remoting Post. He discusses why.....and refers to a "super particle beam" thing in jest. .. But .... you can do the same thing with WCF, via my "WCF Interfaced Development". You're letting the "Host" do the data collecting, and then pushing the collected data to the client. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news 3a7j3p9tpbjsldt4mq22ainphcp08s3hm (AT) 4ax (DOT) com...On Thu, 8 Nov 2007 17:01:16 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: If you're going from the ground up, I'd go straight to WCF. See my sample here: http://sholliday.spaces.live.com/Blo...842A!158.entry Its not a super-simple example like (you and I both) find alot of times. .. However, the objects that get sent across the wire are ... copies. I'm not sure what you're getting at. Do you want the code to execute on the server? You want the objects to be connected to the server at all times? Check this blog entry as well. http://sholliday.spaces.live.com/Blo...842A!122.entry But I still recommend going to WCF. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:cl07j318asoergdptl23u6morui437ammc (AT) 4ax (DOT) com... I am converting a C++ MFC client-server application to C# dotNet and I would like to switch my TCP/IP messages to use dotNet remoting concepts. I can successfully implement many remoting samples, for example from Wrox Press Professional C#. However all of these find have trivial objects that are invoked on the server. None has to access any difficult data values to return to the client. I need to access data maintained by class instances within the server application. Yet the server object instantiated by the remote isn't "connected" to the server application that I can tell. Assembly.GetExecutingAssembly() indicates that the object is running under the object's library dll and Assembly.GetCallingAssembly() returns a windows system dll. In MFC, all I would have to do from a server dll is call AfxGetApp() and recast it to my CMainApp() derived class. Is there an equivalent in dotNet or is there another way I can access the instance of my server? As you may suspect, I am a newbie in C# and dotNet. It might be trivial. Thanks for the pointer. I did browse through this newsgroup (ms.public.distributed_apps) before posting and saw references (probably yours) to WCF but didn't find much reference to it elsewhere. But I'll take a look. What I want to do is to have the client query the server for data values that relate to various external equipment that the server is communicating with. So the client proxy class has to communicate with the host real class which interrogates the real server app to find out what the current state of that external equipment is. |
#8
| |||
| |||
|
|
3.0 is an "addon" to 2.0. It does not require a new version of VS200x. It works with VS2005. The framework is free. The CTP is free. So there is not a financial reason not to do it. 3.0 runs on XP, WinServer2003, Vista and WinServer2008. ....... "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:5239j35ig21sncjgamomcdaa8tgc8k0q8c (AT) 4ax (DOT) com... You may recall that I did admit to being a newbie in dotNet. Of course WCF seems to be dotNet 3.0 and I am currently tied to Visual Studio 2005 and dotNet 2 and don't feel like shelling out another thousand bucks or so just to be that current. My socket TCP/IP messaging has worked well through Dos and C through Windows and C++ and translated easily into dotNet and C#. There is a limit on just how much I am willing to upgrade the infrastructure of the project if it doesn't show up in the user interface where you can far more easily justify the cost. There is always the response "it works now, why should I pay X thousand dollars extra to get the same thing?". Yes, the infrastructure is the most important part, but it is also the hardest to sell. On Thu, 8 Nov 2007 20:56:55 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: The follow the link...that I have at my Remoting Post. He discusses why.....and refers to a "super particle beam" thing in jest. .. But .... you can do the same thing with WCF, via my "WCF Interfaced Development". You're letting the "Host" do the data collecting, and then pushing the collected data to the client. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news 3a7j3p9tpbjsldt4mq22ainphcp08s3hm (AT) 4ax (DOT) com...On Thu, 8 Nov 2007 17:01:16 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: If you're going from the ground up, I'd go straight to WCF. See my sample here: http://sholliday.spaces.live.com/Blo...842A!158.entry Its not a super-simple example like (you and I both) find alot of times. .. However, the objects that get sent across the wire are ... copies. I'm not sure what you're getting at. Do you want the code to execute on the server? You want the objects to be connected to the server at all times? Check this blog entry as well. http://sholliday.spaces.live.com/Blo...842A!122.entry But I still recommend going to WCF. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:cl07j318asoergdptl23u6morui437ammc (AT) 4ax (DOT) com... I am converting a C++ MFC client-server application to C# dotNet and I would like to switch my TCP/IP messages to use dotNet remoting concepts. I can successfully implement many remoting samples, for example from Wrox Press Professional C#. However all of these find have trivial objects that are invoked on the server. None has to access any difficult data values to return to the client. I need to access data maintained by class instances within the server application. Yet the server object instantiated by the remote isn't "connected" to the server application that I can tell. Assembly.GetExecutingAssembly() indicates that the object is running under the object's library dll and Assembly.GetCallingAssembly() returns a windows system dll. In MFC, all I would have to do from a server dll is call AfxGetApp() and recast it to my CMainApp() derived class. Is there an equivalent in dotNet or is there another way I can access the instance of my server? As you may suspect, I am a newbie in C# and dotNet. It might be trivial. Thanks for the pointer. I did browse through this newsgroup (ms.public.distributed_apps) before posting and saw references (probably yours) to WCF but didn't find much reference to it elsewhere. But I'll take a look. What I want to do is to have the client query the server for data values that relate to various external equipment that the server is communicating with. So the client proxy class has to communicate with the host real class which interrogates the real server app to find out what the current state of that external equipment is. |
#9
| |||
| |||
|
|
On Fri, 9 Nov 2007 13:54:43 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: Does installing dotNet 3.0 on my system automatically give VS2005 the ability to reference System.ServiceModel? (You see how much I don't know?) 3.0 is an "addon" to 2.0. It does not require a new version of VS200x. It works with VS2005. The framework is free. The CTP is free. So there is not a financial reason not to do it. 3.0 runs on XP, WinServer2003, Vista and WinServer2008. ....... "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:5239j35ig21sncjgamomcdaa8tgc8k0q8c (AT) 4ax (DOT) com... You may recall that I did admit to being a newbie in dotNet. Of course WCF seems to be dotNet 3.0 and I am currently tied to Visual Studio 2005 and dotNet 2 and don't feel like shelling out another thousand bucks or so just to be that current. My socket TCP/IP messaging has worked well through Dos and C through Windows and C++ and translated easily into dotNet and C#. There is a limit on just how much I am willing to upgrade the infrastructure of the project if it doesn't show up in the user interface where you can far more easily justify the cost. There is always the response "it works now, why should I pay X thousand dollars extra to get the same thing?". Yes, the infrastructure is the most important part, but it is also the hardest to sell. On Thu, 8 Nov 2007 20:56:55 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: The follow the link...that I have at my Remoting Post. He discusses why.....and refers to a "super particle beam" thing in jest. .. But .... you can do the same thing with WCF, via my "WCF Interfaced Development". You're letting the "Host" do the data collecting, and then pushing the collected data to the client. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news 3a7j3p9tpbjsldt4mq22ainphcp08s3hm (AT) 4ax (DOT) com...On Thu, 8 Nov 2007 17:01:16 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: If you're going from the ground up, I'd go straight to WCF. See my sample here: http://sholliday.spaces.live.com/Blo...842A!158.entry Its not a super-simple example like (you and I both) find alot of times. .. However, the objects that get sent across the wire are ... copies. I'm not sure what you're getting at. Do you want the code to execute on the server? You want the objects to be connected to the server at all times? Check this blog entry as well. http://sholliday.spaces.live.com/Blo...842A!122.entry But I still recommend going to WCF. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:cl07j318asoergdptl23u6morui437ammc (AT) 4ax (DOT) com... I am converting a C++ MFC client-server application to C# dotNet and I would like to switch my TCP/IP messages to use dotNet remoting concepts. I can successfully implement many remoting samples, for example from Wrox Press Professional C#. However all of these find have trivial objects that are invoked on the server. None has to access any difficult data values to return to the client. I need to access data maintained by class instances within the server application. Yet the server object instantiated by the remote isn't "connected" to the server application that I can tell. Assembly.GetExecutingAssembly() indicates that the object is running under the object's library dll and Assembly.GetCallingAssembly() returns a windows system dll. In MFC, all I would have to do from a server dll is call AfxGetApp() and recast it to my CMainApp() derived class. Is there an equivalent in dotNet or is there another way I can access the instance of my server? As you may suspect, I am a newbie in C# and dotNet. It might be trivial. Thanks for the pointer. I did browse through this newsgroup (ms.public.distributed_apps) before posting and saw references (probably yours) to WCF but didn't find much reference to it elsewhere. But I'll take a look. What I want to do is to have the client query the server for data values that relate to various external equipment that the server is communicating with. So the client proxy class has to communicate with the host real class which interrogates the real server app to find out what the current state of that external equipment is. |
#10
| |||
| |||
|
|
I googled "WCF Getting Started". Found this: http://www.thoughtshapes.com/WCF/GettingStarted.htm "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:ffb9j3d02iubaa6omiuhkl1q7i8ug6ao5l (AT) 4ax (DOT) com... On Fri, 9 Nov 2007 13:54:43 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: Does installing dotNet 3.0 on my system automatically give VS2005 the ability to reference System.ServiceModel? (You see how much I don't know?) 3.0 is an "addon" to 2.0. It does not require a new version of VS200x. It works with VS2005. The framework is free. The CTP is free. So there is not a financial reason not to do it. 3.0 runs on XP, WinServer2003, Vista and WinServer2008. ....... "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:5239j35ig21sncjgamomcdaa8tgc8k0q8c (AT) 4ax (DOT) com... You may recall that I did admit to being a newbie in dotNet. Of course WCF seems to be dotNet 3.0 and I am currently tied to Visual Studio 2005 and dotNet 2 and don't feel like shelling out another thousand bucks or so just to be that current. My socket TCP/IP messaging has worked well through Dos and C through Windows and C++ and translated easily into dotNet and C#. There is a limit on just how much I am willing to upgrade the infrastructure of the project if it doesn't show up in the user interface where you can far more easily justify the cost. There is always the response "it works now, why should I pay X thousand dollars extra to get the same thing?". Yes, the infrastructure is the most important part, but it is also the hardest to sell. On Thu, 8 Nov 2007 20:56:55 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: The follow the link...that I have at my Remoting Post. He discusses why.....and refers to a "super particle beam" thing in jest. .. But .... you can do the same thing with WCF, via my "WCF Interfaced Development". You're letting the "Host" do the data collecting, and then pushing the collected data to the client. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news 3a7j3p9tpbjsldt4mq22ainphcp08s3hm (AT) 4ax (DOT) com...On Thu, 8 Nov 2007 17:01:16 -0500, "sloan" <sloan (AT) ipass (DOT) net> wrote: If you're going from the ground up, I'd go straight to WCF. See my sample here: http://sholliday.spaces.live.com/Blo...842A!158.entry Its not a super-simple example like (you and I both) find alot of times. .. However, the objects that get sent across the wire are ... copies. I'm not sure what you're getting at. Do you want the code to execute on the server? You want the objects to be connected to the server at all times? Check this blog entry as well. http://sholliday.spaces.live.com/Blo...842A!122.entry But I still recommend going to WCF. "r norman" <r_s_norman (AT) _comcast (DOT) net> wrote in message news:cl07j318asoergdptl23u6morui437ammc (AT) 4ax (DOT) com... I am converting a C++ MFC client-server application to C# dotNet and I would like to switch my TCP/IP messages to use dotNet remoting concepts. I can successfully implement many remoting samples, for example from Wrox Press Professional C#. However all of these find have trivial objects that are invoked on the server. None has to access any difficult data values to return to the client. I need to access data maintained by class instances within the server application. Yet the server object instantiated by the remote isn't "connected" to the server application that I can tell. Assembly.GetExecutingAssembly() indicates that the object is running under the object's library dll and Assembly.GetCallingAssembly() returns a windows system dll. In MFC, all I would have to do from a server dll is call AfxGetApp() and recast it to my CMainApp() derived class. Is there an equivalent in dotNet or is there another way I can access the instance of my server? As you may suspect, I am a newbie in C# and dotNet. It might be trivial. Thanks for the pointer. I did browse through this newsgroup (ms.public.distributed_apps) before posting and saw references (probably yours) to WCF but didn't find much reference to it elsewhere. But I'll take a look. What I want to do is to have the client query the server for data values that relate to various external equipment that the server is communicating with. So the client proxy class has to communicate with the host real class which interrogates the real server app to find out what the current state of that external equipment is. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |