0

I've always used ASMX Web Services for when I need to do AJAX, but I'm just starting to use WCF Web Services because, well, it's newer and better isn't it? Not exactly sure why I want to use WCF, probably the same reason I upgraded from Visual Studio 2010 to Visual Studio 2012.

I have the exact same method in WS.asmx as I do in WS.svc, but when I set a break point on both, I'm only able to step through the ASMX method. Why?

I don't think the code is relevant but I'll paste anyway..

ASMX:

[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string FetchData(string jsonAOData)
{
    // some code here throws an exception
    return "";
}

WCF:

[OperationContract]
public string FetchData(string jsonAOData)
{
    // some code here throws an exception
    return "";
}

Anyone know why I can't step through the WCF method?

notAnonymousAnymore
  • 2,637
  • 9
  • 49
  • 74
  • If you are looking for something newer and better, check out servicestack.net - debugging it is a breeze, amongst many other benefits. – Mike Pugh Jun 09 '13 at 17:06
  • 1
    I debugged dozens of wcfs and they always debug like a breeze. – Wiktor Zychla Jun 09 '13 at 20:21
  • I usually host my web apps in IIS, and debug them **clicking on Debug > Attach to Process > select "w3wp.exe" process > click Attach** – Thomas C. G. de Vilhena Jun 09 '13 at 23:28
  • "I can't step through it"? Are you sure the method is even being _called_? – John Saunders Jun 09 '13 at 23:57
  • hi, there is tracing tool as part of .NET, which will help you enable tracing and view the trace check this link http://stackoverflow.com/questions/16679104/trace-wcf-call-from-client/16715631#16715631 – CSharped Jun 10 '13 at 04:56

0 Answers0