Solved

Web Service Debugging

Posted on 2014-11-17
5
325 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

776 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