Solved

Web Service Debugging

Posted on 2014-11-17
5
307 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
Comment Utility
Right click the solution, select Debug, start new instance.
0
 
LVL 35

Expert Comment

by:Miguel Oz
Comment Utility
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
Comment Utility
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
Comment Utility
good solution
0
 
LVL 18

Expert Comment

by:Richard Lee
Comment Utility
Your welcome. Always glad to help.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

772 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

11 Experts available now in Live!

Get 1:1 Help Now