none
how do i set up RPC in .Net? RRS feed

  • Question

  • i'm pretty sure .Net Remoting is needed here but not sure.

    here's what i need to do.. have an old VB6 Windows app that uses RPC to connect to and access a SQLite database (basically a flat file) that resides on a thin client (or 'CAT'). you can get into the client machine via a normal remote desktop connection using it's ip address. what i need to do is convert the VB6 code to .Net while continuing to use the database on the client. so i'm assuming that setting up RPC in .Net is necessary but i have no idea where to start. i'm also assuming that the method to do this in .Net is different than in VB6 but maybe it isn't. can anybody help me get started on this?

    related..

    is the localhost ip address the same as your PC's ip address?

    is there always a port 8080 available to use? seems I see that in all the samples I've seen (but didn't help me). if not which ones do I use?

    since my database resides on a thin CLIENT, does it make sense for my server and remote objects to be installed there?

    does the .Net framework have to be installed on the CAT if the server and remote object were created in .Net?

    Monday, May 13, 2013 2:37 PM

Answers

  • On 5/13/2013 10:37 AM, Palefire wrote:

    i'm pretty sure .Net Remoting is needed here but not sure.

    here's what i need to do.. have an old VB6 Windows app that uses RPC to connect to and access a SQLite database (basically a flat file) that resides on a thin client (or 'CAT'). you can get into the client machine via a normal remote desktop connection using it's ip address. what i need to do is convert the VB6 code to .Net while continuing to use the database on the client. so i'm assuming that setting up RPC in .Net is necessary but i have no idea where to start. i'm also assuming that the method to do this in .Net is different than in VB6 but maybe it isn't. can anybody help me get started on this?

    RPC is used by WCF when using a selfhosted service over TCP/IP, Named-Pipe or MSMQ. WCF is going to take care of everything for you.


    related..

    is the localhost ip address the same as your PC's ip address?

    Localhost is the Loop Back IP of 127.0.0.1. It is not the same as a WAN or LAN IP obtained from a DHCP server on a network or a static IP is used on the LAN or WAN. You can look-up the Loop Back IP with Bing or Google to see what it means.


    is there always a port 8080 available to use? seems I see that in all the samples I've seen (but didn't help me). if not which ones do I use?

    YOu can use any high port number above 0-1023. 0-1023 are low ports that are well-known and are reserved. You can use any high port you want from 1024-66535 as long as there is not another program running on the computer that is already listing on the port.

    A well-known high port is the MS SQL Server port 1433 and is used for remote connections to SQL Server. If SQL Server is running the machine, it is listening on the port for remote connections. Of course, you can't use the port.

    So you must find out what applications are running on the machine that is hosting the WCF service and pick a port that is not being used. There is a list of well-known ports established by the IANA and you can look them up.
     > since my database resides on a thin CLIENT, does it make sense for my server and remote objects to be installed there?

    One machine has to be the client, and one machine has to be the server that is hosting the WCF service and the database.


    does the .Net framework have to be installed on the CAT if the server and remote object were created in .Net?

    What you needed to use is a WCF selfhosting WCF service using TCP/IP.

    Monday, May 13, 2013 4:31 PM

All replies

  • On 5/13/2013 10:37 AM, Palefire wrote:

    i'm pretty sure .Net Remoting is needed here but not sure.

    here's what i need to do.. have an old VB6 Windows app that uses RPC to connect to and access a SQLite database (basically a flat file) that resides on a thin client (or 'CAT'). you can get into the client machine via a normal remote desktop connection using it's ip address. what i need to do is convert the VB6 code to .Net while continuing to use the database on the client. so i'm assuming that setting up RPC in .Net is necessary but i have no idea where to start. i'm also assuming that the method to do this in .Net is different than in VB6 but maybe it isn't. can anybody help me get started on this?

    RPC is used by WCF when using a selfhosted service over TCP/IP, Named-Pipe or MSMQ. WCF is going to take care of everything for you.


    related..

    is the localhost ip address the same as your PC's ip address?

    Localhost is the Loop Back IP of 127.0.0.1. It is not the same as a WAN or LAN IP obtained from a DHCP server on a network or a static IP is used on the LAN or WAN. You can look-up the Loop Back IP with Bing or Google to see what it means.


    is there always a port 8080 available to use? seems I see that in all the samples I've seen (but didn't help me). if not which ones do I use?

    YOu can use any high port number above 0-1023. 0-1023 are low ports that are well-known and are reserved. You can use any high port you want from 1024-66535 as long as there is not another program running on the computer that is already listing on the port.

    A well-known high port is the MS SQL Server port 1433 and is used for remote connections to SQL Server. If SQL Server is running the machine, it is listening on the port for remote connections. Of course, you can't use the port.

    So you must find out what applications are running on the machine that is hosting the WCF service and pick a port that is not being used. There is a list of well-known ports established by the IANA and you can look them up.
     > since my database resides on a thin CLIENT, does it make sense for my server and remote objects to be installed there?

    One machine has to be the client, and one machine has to be the server that is hosting the WCF service and the database.


    does the .Net framework have to be installed on the CAT if the server and remote object were created in .Net?

    What you needed to use is a WCF selfhosting WCF service using TCP/IP.

    Monday, May 13, 2013 4:31 PM
  • so how would I go about setting up WCF/IIS/web server on the CAT machine so I can create a web service?
    Tuesday, May 14, 2013 3:21 PM
  • On 5/14/2013 11:21 AM, Palefire wrote:

    so how would I go about setting up WCF/IIS/web server on the CAT machine so I can create a web service?

    <https://www.google.com/#hl=en&sclient=psy-ab&q=wcf+web+service+tutorial&oq=wcf+web+service&gs_l=hp.1.1.0l4.0.0.1.2063.0.0.0.0.0.0.0.0..0.0...0.0...1c..12.psy-ab.d_HwRNxBT9g&pbx=1&bav=on.2,or.r_qf.&bvm=bv.46471029,d.dmg&fp=5c8011ab03e61ec8&biw=1600&bih=736>

    In addition to the links, I suggest you get a good book on WCF.

    Tuesday, May 14, 2013 3:58 PM