Results 1 to 2 of 2

Thread: [2005] How to make this a Remote Service??

  1. #1

    Thread Starter
    Lively Member vbJoe's Avatar
    Join Date
    Dec 2003
    Location
    Bus Shelter, Manchester
    Posts
    67

    Unhappy [2005] How to make this a Remote Service??

    Anyone know how to make the client side of this small example access the server side on a different machine?? I'm guessing its something to do with the imports bit in the client side?? Help!!!


    VB Code:
    1. 'BankComponent Server
    2. Imports System.EnterpriseServices
    3. Imports System.Runtime.CompilerServices
    4. Imports System.Reflection
    5.  
    6. ' Supply the COM+ application name.
    7. <assembly: ApplicationName("BankComponent")>
    8. ' Supply a strong-named assembly.
    9. <assembly: AssemblyKeyFileAttribute("BankComponent.snk")>
    10.  
    11. Namespace BankComponent
    12.       <Transaction(TransactionOption.Required)> _
    13.       Public Class Account
    14. Inherits ServicedComponent
    15.             <AutoComplete()> _
    16.             Public Sub  Post(accountNum As Integer, amount As Double)
    17.                   ' Updates the database; no need to call SetComplete.
    18.                   ' Calls SetComplete automatically if no exception is generated.
    19.             End Sub
    20.       End Class
    21. End Namespace
    22.  
    23.  
    24.  
    25.  
    26. 'BankComponent Client
    27. Imports BankComponent
    28. Public Class Client
    29.    Shared Sub Main()
    30.       Dim Account As New Account()
    31.       ' Post money into the account.
    32.       Account.Post(5, 100)
    33.    End Sub
    34. End Class
    [vbcode]On Error Goto Pub[/vbcode]

  2. #2

    Thread Starter
    Lively Member vbJoe's Avatar
    Join Date
    Dec 2003
    Location
    Bus Shelter, Manchester
    Posts
    67

    Re: [2005] How to make this a Remote Service??

    Anyone?
    [vbcode]On Error Goto Pub[/vbcode]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width