By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,923 Members | 1,915 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,923 IT Pros & Developers. It's quick & easy.

using Console.Writeln(...) in WebServices or ASP.NET application

P: n/a
Hello!

When you have windows forms you have the same possibility as when you have a
Console application
to use Console.Writeln to write whatever on the screen.

Now to my question:
Is it possible to use Console.Writeln when you have a Webservice. I don't
think it's possible but
just to be sure I ask you?

Is it possible to use Console.Writeln when you have a ASP.NET application
developed by using
"inline" or "Code behind" technics?

//Tony
Aug 16 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Hi Tony,

Who would see the console? What would you show on the console?
You can use Console.WriteLine in any app, but the text will just vanish
unless you open a console first.
On Wed, 16 Aug 2006 08:58:51 +0200, tony <jo*****************@telia.com>
wrote:
Hello!

When you have windows forms you have the same possibility as when you
have a
Console application
to use Console.Writeln to write whatever on the screen.

Now to my question:
Is it possible to use Console.Writeln when you have a Webservice. I don't
think it's possible but
just to be sure I ask you?

Is it possible to use Console.Writeln when you have a ASP.NET application
developed by using
"inline" or "Code behind" technics?

//Tony



--
Happy Coding!
Morten Wennevik [C# MVP]
Aug 16 '06 #2

P: n/a
Hello!

Assume I use a Webrowser or a web client to call a webservice can I then
open a Console in the webservice method and write to it.
I can't just use Console.Writeln(..) in the webservice method.
You mentioned that I must open the Console first. How do I do that?
Have you some easy example how thta is being done?

//Tony

"Morten Wennevik" <Mo************@hotmail.comskrev i meddelandet
news:op***************@tr024.bouvet.no...
Hi Tony,

Who would see the console? What would you show on the console?
You can use Console.WriteLine in any app, but the text will just vanish
unless you open a console first.
On Wed, 16 Aug 2006 08:58:51 +0200, tony <jo*****************@telia.com>
wrote:
Hello!

When you have windows forms you have the same possibility as when you
have a
Console application
to use Console.Writeln to write whatever on the screen.

Now to my question:
Is it possible to use Console.Writeln when you have a Webservice. I
don't
think it's possible but
just to be sure I ask you?

Is it possible to use Console.Writeln when you have a ASP.NET
application
developed by using
"inline" or "Code behind" technics?

//Tony

--
Happy Coding!
Morten Wennevik [C# MVP]

Aug 16 '06 #3

P: n/a
Hi Tony,

The console would open on the server side as the text will be written on
the server, and therefore invisible to the client. It would probably open
for the user responsible for the application pool running the web service,
but I'm not sure if it will be visible on screen if that users is logged
on to the server.

To create a new console window you can start it using the process class,
or you can route the output streams to wherever you chose.

What are you trying to do? What kind of information are you planning to
write in the console, and who should see it?
On Wed, 16 Aug 2006 09:33:53 +0200, tony <jo*****************@telia.com>
wrote:
Hello!

Assume I use a Webrowser or a web client to call a webservice can I then
open a Console in the webservice method and write to it.
I can't just use Console.Writeln(..) in the webservice method.
You mentioned that I must open the Console first. How do I do that?
Have you some easy example how thta is being done?

//Tony

"Morten Wennevik" <Mo************@hotmail.comskrev i meddelandet
news:op***************@tr024.bouvet.no...
>Hi Tony,

Who would see the console? What would you show on the console?
You can use Console.WriteLine in any app, but the text will just vanish
unless you open a console first.
On Wed, 16 Aug 2006 08:58:51 +0200, tony <jo*****************@telia.com>
wrote:
Hello!

When you have windows forms you have the same possibility as when you
have a
Console application
to use Console.Writeln to write whatever on the screen.

Now to my question:
Is it possible to use Console.Writeln when you have a Webservice. I
don't
think it's possible but
just to be sure I ask you?

Is it possible to use Console.Writeln when you have a ASP.NET
application
developed by using
"inline" or "Code behind" technics?

//Tony


--
Happy Coding!
Morten Wennevik [C# MVP]



--
Happy Coding!
Morten Wennevik [C# MVP]
Aug 16 '06 #4

P: n/a
Hello!

I'm not trying to do anything but if I want to get some trace information I
thought it might be easier to write to
the Console then creating a file and then write to it.

I use localhost and IIS and I have tried to use this Consol.Writeln(..) but
no Console is created.
So you mean if I use localhost and IIS and create a console from the process
class I will be able to write to a console window.

Or do you think it's impossible to create a Console from the process class
and then write to it like a normal console application
when using localhost and IIS.
//Tony

"Morten Wennevik" <Mo************@hotmail.comskrev i meddelandet
news:op***************@tr024.bouvet.no...
Hi Tony,

The console would open on the server side as the text will be written on
the server, and therefore invisible to the client. It would probably open
for the user responsible for the application pool running the web service,
but I'm not sure if it will be visible on screen if that users is logged
on to the server.

To create a new console window you can start it using the process class,
or you can route the output streams to wherever you chose.

What are you trying to do? What kind of information are you planning to
write in the console, and who should see it?
On Wed, 16 Aug 2006 09:33:53 +0200, tony <jo*****************@telia.com>
wrote:
Hello!

Assume I use a Webrowser or a web client to call a webservice can I then
open a Console in the webservice method and write to it.
I can't just use Console.Writeln(..) in the webservice method.
You mentioned that I must open the Console first. How do I do that?
Have you some easy example how thta is being done?

//Tony

"Morten Wennevik" <Mo************@hotmail.comskrev i meddelandet
news:op***************@tr024.bouvet.no...
Hi Tony,

Who would see the console? What would you show on the console?
You can use Console.WriteLine in any app, but the text will just vanish
unless you open a console first.
On Wed, 16 Aug 2006 08:58:51 +0200, tony
<jo*****************@telia.com>
wrote:

Hello!

When you have windows forms you have the same possibility as when you
have a
Console application
to use Console.Writeln to write whatever on the screen.

Now to my question:
Is it possible to use Console.Writeln when you have a Webservice. I
don't
think it's possible but
just to be sure I ask you?

Is it possible to use Console.Writeln when you have a ASP.NET
application
developed by using
"inline" or "Code behind" technics?

//Tony



--
Happy Coding!
Morten Wennevik [C# MVP]

--
Happy Coding!
Morten Wennevik [C# MVP]

Aug 16 '06 #5

P: n/a
Tony,

I'm guessing the Console will be created, but noone will be able to see
it. Stick to writing to a file. In the end, data in the console will
vanish once you close it, but you can still check out the file later on.

[Create Simple Error Log Files using ASP.NET and C#]
http://www.codeproject.com/aspnet/createlogfiles.asp

There are many ways to log information

On Wed, 16 Aug 2006 10:29:32 +0200, tony <jo*****************@telia.com>
wrote:
Hello!

I'm not trying to do anything but if I want to get some trace
information I
thought it might be easier to write to
the Console then creating a file and then write to it.

I use localhost and IIS and I have tried to use this Consol.Writeln(..)
but
no Console is created.
So you mean if I use localhost and IIS and create a console from the
process
class I will be able to write to a console window.

Or do you think it's impossible to create a Console from the process
class
and then write to it like a normal console application
when using localhost and IIS.
//Tony

"Morten Wennevik" <Mo************@hotmail.comskrev i meddelandet
news:op***************@tr024.bouvet.no...
>Hi Tony,

The console would open on the server side as the text will be written on
the server, and therefore invisible to the client. It would probably
open
for the user responsible for the application pool running the web
service,
but I'm not sure if it will be visible on screen if that users is logged
on to the server.

To create a new console window you can start it using the process class,
or you can route the output streams to wherever you chose.

What are you trying to do? What kind of information are you planning to
write in the console, and who should see it?
On Wed, 16 Aug 2006 09:33:53 +0200, tony <jo*****************@telia.com>
wrote:
Hello!

Assume I use a Webrowser or a web client to call a webservice can I
then
open a Console in the webservice method and write to it.
I can't just use Console.Writeln(..) in the webservice method.
You mentioned that I must open the Console first. How do I do that?
Have you some easy example how thta is being done?

//Tony

"Morten Wennevik" <Mo************@hotmail.comskrev i meddelandet
news:op***************@tr024.bouvet.no...
Hi Tony,

Who would see the console? What would you show on the console?
You can use Console.WriteLine in any app, but the text will just
vanish
>unless you open a console first.
On Wed, 16 Aug 2006 08:58:51 +0200, tony
<jo*****************@telia.com>
>wrote:

Hello!

When you have windows forms you have the same possibility as when
you
have a
Console application
to use Console.Writeln to write whatever on the screen.

Now to my question:
Is it possible to use Console.Writeln when you have a Webservice. I
don't
think it's possible but
just to be sure I ask you?

Is it possible to use Console.Writeln when you have a ASP.NET
application
developed by using
"inline" or "Code behind" technics?

//Tony

--
Happy Coding!
Morten Wennevik [C# MVP]


--
Happy Coding!
Morten Wennevik [C# MVP]



--
Happy Coding!
Morten Wennevik [C# MVP]
Aug 16 '06 #6

P: n/a
Hello,

It's possible to get a trace of your application in a Console.

You may be interested by System.Diagnostics.Debug class :
http://msdn2.microsoft.com/en-us/lib...ics.debug.aspx
http://www.dotnetspider.com/namespac...spx?ClassId=74

If you use Visual Web Developer, you can display this debug console
with :
Debug =Windows =Output

Good Luck !

tony a écrit :
Hello!

When you have windows forms you have the same possibility as when you have a
Console application
to use Console.Writeln to write whatever on the screen.

Now to my question:
Is it possible to use Console.Writeln when you have a Webservice. I don't
think it's possible but
just to be sure I ask you?

Is it possible to use Console.Writeln when you have a ASP.NET application
developed by using
"inline" or "Code behind" technics?

//Tony
Aug 16 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.