Results 1 to 7 of 7

Thread: End of statement expected

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232

    End of statement expected

    I am writing a aspx page which simply calls a webservice. I already tried this when the webservice and the aspx page were on the same server.
    However, now I am trying to call it from a different server.
    But I am getting the following error:
    BC30205: End of statement expected.
    The line of code it is breaking out on is:
    Dim WS As New programer-2.service1
    programer-2 is the name of the server and service1 is thename fo the webservice. is it a problem with the hypen in the computer name???
    IS there a workaround for this??
    PLease let me know if you have any answers for me thanks.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The webservice name must match the class that you created for it at designtime. If the URL will change then select it in the Solution Explorer and set the URL to 'dynamic' and it will place it in an app.config file and you can change it there.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232
    Can you please give me more detail, I am very new to all this. (.NET).

    The webservice name must match the class that you created for it at designtime.
    what do you mean?
    Also, I am not doing this in a project it is just a .aspx file. So where do i add the webservice.
    Thanks in advance.

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The help files will have more information on using Web Services but you need to make a web reference to the web service via the References part of the Solution Explorer. That will create a class that helps you communicate with the web service.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232
    but as i mentioned before, i dont have this in a project so it doesnt give me the option to add a web reference.
    If it does, can you tell me where ??

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Shevy
    is it a problem with the hypen in the computer name???
    No . Can't say more about this problem .

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232

    Talking

    THanks!

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