Results 1 to 2 of 2

Thread: Windows Services

  1. #1

    Thread Starter
    Addicted Member Nigh™a®e's Avatar
    Join Date
    Feb 2002
    Location
    Belgium
    Posts
    175

    Windows Services

    Hi all,

    for a few months now im working in .NET mostly ASP.NET
    I created a little backoffice software for my site.

    Next thing to find out in .NET are the windows services

    i created a server , can start, stop services, write log events, ....
    How can i communicate between the service and the site / app??

    is use the ServiceController.ExecuteCommand(Integer)
    The problem here is , i can only send command 128 - 255

    not including parameters.

    I want to use commands and function in the service triggered from the application. I also want to fire events from the service to the application.

    Is this possible and how???

    BTW: New VBWorld site looks super

  2. #2
    New Member
    Join Date
    Jun 2002
    Posts
    6
    Once you have your web service created, you are 75% done. To access a webservice from a normal vb app, you have to add a web reference. Right click on references on your solution explorer and click add web reference. Then type in the location at the top i.e. localhost and choose the reference. Then it will show up under web references in ur solution explorer. And, for example, here is some code I used to access a webservice function:
    Code:
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim objWeb As New localhost.Service1()
    MessageBox.Show(objWeb.Whateverfunction(params))
    End Sub

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