473,811 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compiling webservice using csc.exe

if i build using visual studio no problem everything works great.

if i use csc.exe to compile webservice, and everything works fine. except
writing to log.

i have some code in global.asax and also trace entire webservice which
writes to the log

global.asax

Trace.AutoFlush = true;
StringBuilder strbTemp = new
StringBuilder(" *************** *************** *************** *******" +
Environment.New Line + "[" + AppDomain.GetCu rrentThreadId() + "]");
strbTemp.Append (" " + startTime.ToStr ing("M/d/yyyy HH:mm:ss.fff") + " : ");
strbTemp.Append ("Tets40 version ");
strbTemp.Append (Test40.m_WSVer sion);
strbTemp.Append (" initialization start.");
Trace.WriteLine If( Simulator40.m_t raceMonitorSwit ch.TraceVerbose ,
strbTemp.ToStri ng() );

web.config
<system.diagnos tics>
<switches>
<!--Trace Switch Values:
0 Off: No tracing
1 Error: Trace errors only
2 Warning: Trace errors and warnings
3 Info: Trace errors, warnings, and informational events
4 Verbose: Trace everything -->

<add name="TraceMoni torSwitch" value="4" />
</switches>
<trace autoflush="true " indentsize="0">
<listeners>
<add name="Applicati onLogFile"
type="System.Di agnostics.TextW riterTraceListe ner"
initializeData= "D:\Test40\log\ Test40.log" />
</listeners>
</trace>
</system.diagnost ics>
I donno whats going on here ? the log is not being written but entire
functionality works fine.

please let me know.

thanks
Gouda
Mar 9 '06 #1
1 1688
As mentioned here:
http://www.thejoyofcode.com/DebugVie...internals.aspx, you need
to use the /d:TRACE switch with csc.exe otherwise the calls to
System.Diagnost ics.Trace aren't compiled into your code.

They're decorated with the [Conditional("TR ACE")] attribute.

Josh
http://www.thejoyofcode.com/

Mar 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1925
by: Paul C. | last post by:
I am new to programming in C# using Mono (mcs). What .dll does this "InitializeComponent()" method reside in? Code: // mcs web.cs -lib:C:\Program~1\Mono-1.0\lib -r:System.Data -r:System.Web -r:System.Web.Services -r:System.Drawing // using System;
6
768
by: Davie | last post by:
I want to authorise a user of a web service by using the AuthHeaderValue for some reason I keep getting a null reference exception when I try to run the following code: It seems to work fine on a .NET Framework application, but just not on the .NET CF version. Can anyone suggest anything that might be wrong with the code? (I could post the app and webservice, but i was hoping that you might have noticed something from the supplied...
0
949
by: jim | last post by:
Hi Everyone, When I converted one visual .net project from 2002 to 2003, there is an error occursing during compiling under visual studio .net 2003 as followoing: Command Lines Creating temporary file "d:\Development\WebService\temp\ManagedSdk\Debug\RSP000008.rsp" with contents Creating command line "cl.exe @d:\Development\WebService\temp\ManagedSdk\Debug\RSP000008.rsp /nologo"
5
2049
by: Nick Gilbert | last post by:
Hi, I'm having problems using Flash Remoting with Web Services for ASP.NET and I've narrowed the problem down to csc.exe when it tries to compile the stub class. Flash Remoting (flashgateway.dll) is calling the following command line to compile the stub class: "csc.exe" /out:ExampleWebService.dll /t:library ExampleWebService.cs
7
2029
by: Alessandro Benedetti | last post by:
Hi. I'm calling two methods of a .NET Webservice (A) from another Webservice (B). The A Webservice is made like this: public class WSA: System.Web.Services.WebService { private int X = 0;
5
3801
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains about one of the object wanting to extend MarshalByRefObject object, and I get an error SDL1030. I can use the webservice in a C# project just fine but not the C++. Can anyone help me out with this?
1
3483
by: Thom Little | last post by:
I have a simple web service that requires no input and returns a character string. I created the service and FTPd it to a remote server. The .dll to the .bin directory and the single .asmx file to a directory called Services. When referenced from a webapplication running on localhost it operates correctly. When referenced from a webapplication running on the same remote server as the webservice it operates correctly.
0
2683
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi All, Problem in deploying my WebService developed using Asp.net WebServices 2005. I have designed simple WebService using Asp.net Webservices 2.0 , The webservice look this , using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols;
1
2016
by: UT-BadBoy | last post by:
Hi, I've been receving this error "System.InvalidOperationException: The namespace, , is a duplicate." and have been unable to locate the exact cause of the exception. I've written a webservice with the new AJAX extensions for .NET. The webservice is marked up with a ScriptService attribute tag along with each method being marked up as a ScriptMethod.
0
9727
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10647
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10398
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.