Solved

Debug ASP.NET Web Service in VB.NET

Posted on 2009-07-10
2
330 Views
Last Modified: 2012-05-07
Hello!
   I'm using Visual Studio.NET 2003, and i need to debug an ASP.NET Web Service consumed from a VB.NET application.
   To simplify things, i've wrote a VB.NET application that adds two numbers (see the attached code). To do that my application consumes a web service. I've created an ASP.NET Web Service project under the same solution as my application  (see the attached code). If i need to debug that service, haw can i do that? If i put breakpoints in service code it has no effect (they are skipped).
   Can you help me?   Thank you!
 

'APPLICATION
Imports System.Web.Services
Public Class Form1
    Inherits System.Windows.Forms.Form
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'web reference pt. IIS    - http://localhost/AddThis/Service1.asmx
        Dim a As New localhost.Service1
        Dim x As Int16
        Dim y As Int16
        '
        x = CInt(TextBox1.Text)
        y = CInt(TextBox2.Text)
        '
        MsgBox(a.AddThese(x, y))
        MsgBox("OK!")
    End Sub
End Class
 
'WEB SERVICE
Imports System.Web.Services
<System.Web.Services.WebService(Namespace := "http://tempuri.org/AddThis/Service1")> _
Public Class Service1
    Inherits System.Web.Services.WebService
 
    Public c As Int16
    <WebMethod()> _
    Public Function AddThese(ByVal a As Int16, ByVal b As Int16) As Int16
        c = a + b
        Return c
    End Function
End Class

Open in new window

0
Comment
Question by:Cristi_E
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
apeter earned 500 total points
ID: 24821953
When you hit F11 button on line number 14 , the control should step inside ur web service. Check your web service is built without errors.

Every time you change ur web service, update your web reference from VB application to ensure debugging is working fine. Also check your web reference from VB application pointing to proper web service.
0
 
LVL 14

Expert Comment

by:shahprabal
ID: 24824283
Interesting... try changing :
Dim a As New localhost.Service1
to
Dim a As New Service1
 
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question