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

Discussion in 'ASP .Net' started by Tony Johansson, Jan 9, 2010.

  1. 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
    Tony Johansson, Jan 9, 2010
    #1
    1. Advertising

  2. 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

    "Mark Rae [MVP]" <> skrev i meddelandet
    news:uX%...
    > "Tony Johansson" <> wrote in message
    > news:g7_1n.14493$...
    >
    >> 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 ?

    >
    > What are you hoping to achieve by writing to the Console in a web method?
    > Who's going to see it...?
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    Tony Johansson, Jan 9, 2010
    #2
    1. Advertising

  3. Tony Johansson

    Patrice Guest

    > 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...

    --
    Patrice
    Patrice, Jan 9, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Grey

    Cannot use "Console.WriteLine"

    Grey, Apr 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,399
    =?Utf-8?B?U3VkaGFrYXIgU2FkYXNpdnVuaVtNVlBd?=
    Apr 13, 2004
  2. Flip
    Replies:
    1
    Views:
    621
    Brock Allen
    Apr 14, 2005
  3. Replies:
    1
    Views:
    526
    john_teague
    Sep 1, 2005
  4. =?Utf-8?B?QUFPTSBUaW0=?=

    How can I redirect Console.Writeline to Response.Output?

    =?Utf-8?B?QUFPTSBUaW0=?=, Mar 21, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    620
    =?Utf-8?B?QUFPTSBUaW0=?=
    Mar 21, 2007
  5. AAOM Tim
    Replies:
    2
    Views:
    156
    AAOM Tim
    Mar 21, 2007
Loading...

Share This Page