This was the first time I encountered this kind of error after dealing with RESTful web service in couple of times. I find it hard to trace the cause of error, hope you could help me.
I have this attribute for Login service
[WebGet(UriTemplate = "Login?username={username}&password={password}&ip={ip}", ResponseFormat = WebMessageFormat.Json)]
Using fiddler to use the service:
GET http://localhost:3445/Authenticate/Login?username=jsm&password=a&ip=1
Fiddler response:
[Fiddler] ReadResponse() failed: The server did not return a response for this request.
I'm not sure if it caused by, Content-type: application/json
because when I try to change it to xml:
[WebGet(UriTemplate = "Login?username={username}&password={password}&ip={ip}", ResponseFormat = WebMessageFormat.Xml)]
It gives me this result:
Kinda weird. What I have done wrong? I have to return json object.. Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…