Solved

Web Service Debugging

Posted on 2014-11-17
5
316 Views
Last Modified: 2014-11-18
Hi Experts,

I am working in web service in my asp.net project and i want to debug the webservice. How can i do this?

Please guide me.

Thanks in advance
0
Comment
Question by:Jatin Nahar
5 Comments
 
LVL 11

Expert Comment

by:LordWabbit
ID: 40447209
Right click the solution, select Debug, start new instance.
0
 
LVL 35

Expert Comment

by:Miguel Oz
ID: 40448584
If your project is already in debug configuration and it is selected a start up project, press F5.

Note: 1) or debug mode: Open configuration manager and check that active solution configuration is set to debug
2) Selected a start up project: Right click project and  click "Set as startUp project" menu item.
0
 
LVL 18

Accepted Solution

by:
Richard Lee earned 500 total points
ID: 40449528
To effectively test a web service to ensure that you logic is correct and to work out the kinks and bugs I find it best to use a layered architecture.

It is important to think of your web service and a View or a point of access  for your users. In this case users can be another application whether internal or external. When you thought processes are aligned in this manner you will then need to abstract your business logic into another layer and simple call the operations from your web service.

Users  ---> Web Service ---> Business Layer/Domain Layer

This is a tried and tested principle of N-Layer architecture, however with this approach you can now unit test your code directly against the business layer and not have to worry about the web service complexities.

Unit Tests ---> Business Layer

Now do I hear you asking what about the logic that occurs in your web service method? How do you test that? My answer to your question is simple. Your business layer should implement the Facade Pattern to satisfy the operations performed by the web service thus ensuring that your web service operations only contains a single line of code.

Web Service ---> Business Layer (Facade [Compound Operation] --uses--> Business/Domain Objects)

Now I hear another question. What is the point of having a web service operation with just one line of code? A web service is just another View remember. It is simple here to expose your business functionality another way to other applications or users. It is not hear to re-write functionality!

Hope this helps.
0
 

Author Closing Comment

by:Jatin Nahar
ID: 40449712
good solution
0
 
LVL 18

Expert Comment

by:Richard Lee
ID: 40449733
Your welcome. Always glad to help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now