Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have a web application. Also have a web service. Both of them are in same solution.
The Web Application is consuming the web service. When i am calling the web service from the web application, i find a object reference not found error. I cant debug the webservice, as the Service methods take XML as input.

Can anyone please help me how to debug in this situation. I mean i will run the Web Application, then Webservice will be called and the required input will be sent (XML) to Web service. At this point i want to debug the Web service methods to find out the root of the error.
I am stuck and project delivery getting hampered. Please help.
Posted
Comments
Sergey Alexandrovich Kryukov 26-Mar-15 19:46pm    
Do you want to debug the service or client code consuming this service? Anyway, split the work. Forget ASP.NET until you finish debugging.
In other word, do unit testing, then the component testing, don't rush to test all-put-together solution.
—SA

1 solution

Steps :

1: Solution -> Set StartUp projects -> Choose "Multiple project" (and select both Web and Service)

2: Service project -> Properties -> Web -> Choose "Dont open a page, wait for an external request".

3: Web Project -> Properties -> Web-> choose current page or StartPage as your strting page(optional)

Now you can put debugger inside methods of service project and debug.

Happy debugging!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900