We are trying to debug some web services code we're running in C# on IIS. I am new to Windows programming and have no idea how to view output to the console. We've got some write statements in the code, but I can't figure out how to view the console while this thing is running. Help?
If you're using asp.net then trace.axd should contain trace statements (as long as its turned on).
You aren't going to get a console for IIS. CLOSEST you will come is Debug.WriteLine w/ a debugger attached or using page tracing. Recommendation would be to use a logging framework that will write to debugger (when attached) as well as a file and possibly the event log (all configured via your listeners).
Some great ones are log4net and NLog.
You'll want to take a look at ASP.NET tracing
here is a handy link to get you started: http://www.asp101.com/articles/robert/tracing/default.asp
you can enable application wide tracing if you place the following in your web.config, then you will have access to your trace.axd
<trace enabled="true"
localOnly="false"
pageOutput="false"
requestLimit="500"
traceMode="SortByTime"
/>
I have found the Trace feature extremely helpful. You can get there by going to: http://mysiteurl/trace.axd
In your web.config, place the following within the System.Web tag:
<trace enabled="true"
localOnly="false"
pageOutput="false"
requestLimit="500"
traceMode="SortByTime"
/>
Now from your code behind, you can inject some logging by doing:
HttpContext.Current.Trace.Warn("I Made It Here!");