?
Solved

Debug ASP.NET Web Service in VB.NET

Posted on 2009-07-10
2
Medium Priority
?
332 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 1500 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 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