What can I use to write something like Console.WriteLine in a web servivce method

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hello!

I hope somebody know about web service even if this is a asp.net forum.

If I have a web service method and just want to use something like
Console.WriteLine in a web method how can I write this ?

//Tony
 
This is about web service and not aspx pages.

I don't mean using Console because that is not possible. I mean what can I
write insted of using this Console.WriteLine to write something to the
client..

I just compare if I use for example aspx pages I can use this
Respone.Write(some string here);

//Tony
 
This is about web service and not aspx pages.

Still a bit strange. A web service returns data so usually you just populate
the data structure (a class for example) with data and it will be
serialized/unserialized for you so that is its transmitted transparently
client side. You don't write "out of the band" content inside the serialized
response.
I don't mean using Console because that is not possible. I mean what can I
write insted of using this Console.WriteLine to write something to the
client..

Once again I'm not sure how it would make sense in the context of a web
service. Let's say that your web service returns a string. You'll just
populate this string with whatever you want. You won't write directly
something to the output stream sent to the client.

We'll likely still needs more details :
- do you have a web service that works ?
- if yes what do you want to add with this additional content (a trace, just
some additional data ?)
- if no, where are you stuck. Try perhaps first a simple web service that
returns just a string and then build on this...
 
Back
Top