473,772 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please help VS2005 generates no MSIL for some statements..dis sasembly attached

ste
VS2005, .NET2

I have a dll that is using TraceSources with no problems.

The dll is linked to a webservice.

The webservice creates its own traceSource and every thing looks fine..
however whenever i try and call a TraceEvent, TraceData method nothing gets
called.
Looking at the dissasembly, it is easy to see why.. no code has been
generated for the call .. arghhhhhhhhh
My problem is very similar to this issue, but this issue is for VS2003 and i
presume it has been fixed in 2005
http://www.kbalertz.com/kbNamed_8915...e.correct.aspx
Can anyone suggest a workaround?
<<< Source below

System.Diagnost ics.TraceSource xxx = new TraceSource("my .trace");
xxx.Switch = new SourceSwitch("m y.trace.switch" );
xxx.Listeners.A dd(new ConsoleTraceLis tener());
xxx.Switch.Leve l = SourceLevels.Wa rning;
xxx.TraceData(T raceEventType.C ritical, 1, new Object());
<--- no code generated for this line
bool b = xxx.Switch.Shou ldTrace(TraceEv entType.Verbose ); <---
no problems here
xxx.TraceEvent( TraceEventType. Critical, 12, "help");
<--- no code generated for this line
xxx.Flush();

<< dissasembly.. see line 228

221:
222:
223:
224: System.Diagnost ics.TraceSource xxx = new
TraceSource("my .edon.trace");
00000045 mov ecx,7A752FE8h
0000004a call 01330944
0000004f mov esi,eax
00000051 mov edx,dword ptr ds:[03A4ACB8h]
00000057 mov ecx,esi
00000059 call 797701EC
0000005e mov dword ptr [ebp-38h],esi
225: xxx.Switch = new SourceSwitch("m y.trace.switch" );
00000061 mov ecx,7A75640Ch
00000066 call 01330944
0000006b mov esi,eax
0000006d mov edx,dword ptr ds:[03A4ACBCh]
00000073 mov ecx,esi
00000075 call 7976AF48
0000007a mov edx,esi
0000007c mov ecx,dword ptr [ebp-38h]
0000007f cmp dword ptr [ecx],ecx
00000081 call 79771F08
00000086 nop
226: xxx.Listeners.A dd(new ConsoleTraceLis tener());
00000087 mov ecx,dword ptr [ebp-38h]
0000008a cmp dword ptr [ecx],ecx
0000008c call 79771EC8
00000091 mov edi,eax
00000093 mov ecx,7A7645F4h
00000098 call 790FC9CC
0000009d mov esi,eax
0000009f mov ecx,esi
000000a1 call 79AE8990
000000a6 mov edx,esi
000000a8 mov ecx,edi
000000aa cmp dword ptr [ecx],ecx
000000ac call 7976F638
000000b1 nop
227: xxx.Switch.Leve l = SourceLevels.Wa rning;
000000b2 mov ecx,dword ptr [ebp-38h]
000000b5 cmp dword ptr [ecx],ecx
000000b7 call 79771EE8
000000bc mov esi,eax
000000be mov ecx,esi
000000c0 mov edx,7
000000c5 cmp dword ptr [ecx],ecx
000000c7 call 7976AFC8
000000cc nop
228: xxx.TraceData(T raceEventType.C ritical, 1, new Object());
229:
230: bool b = xxx.Switch.Shou ldTrace(TraceEv entType.Verbose );
000000cd mov ecx,dword ptr [ebp-38h]
000000d0 cmp dword ptr [ecx],ecx
000000d2 call 79771EE8
000000d7 mov esi,eax
000000d9 mov ecx,esi
000000db mov edx,10h
000000e0 cmp dword ptr [ecx],ecx
000000e2 call 7976AFEC
000000e7 mov esi,eax
000000e9 mov eax,esi
000000eb and eax,0FFh
000000f0 mov dword ptr [ebp-28h],eax
234: xxx.TraceEvent( TraceEventType. Critical, 12, "help");
235: xxx.Flush();

http://www.kbalertz.com/kbNamed_8915...e.correct.aspx


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0606-2, 07/02/2006
Tested on: 08/02/2006 20:32:27
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com

Feb 8 '06 #1
2 1570
Does tracing depend on being in debug mode? Isn't there a /debug or
/trace switch to the compiler that enables it?

Feb 8 '06 #2
ste
Chris,

Thanks!!!! You were right....
Unable to find a setting in the web.config but #defining TRACE in my c#
source fixed it


"Chris Dunaway" <du******@gmail .com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Does tracing depend on being in debug mode? Isn't there a /debug or
/trace switch to the compiler that enables it?

---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 0606-2, 07/02/2006
Tested on: 09/02/2006 19:22:08
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com



---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0606-2, 07/02/2006
Tested on: 09/02/2006 19:41:17
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com

Feb 9 '06 #3

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

Similar topics

5
3495
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql, because the dates must have quotes on each side. I just don't know how make the dates right. Well I'll just show you the code and some insert statements it generates. Could anyone please help me?
10
4584
by: Raymond Lewallen | last post by:
Is there some article out there that helps in reading MSIL? I've been looking but can't find anything, and I'm probably just looking in the wrong spots for the wrong keywords. I understand mov, call, jmp, ptr, dword and some of the other obvious pieces. I'm looking to understand some of the less obvious pieces of MSIL so I can better understand how my code is being constructed in release mode. TIA, Raymond Lewallen
8
1168
by: Cyberdog | last post by:
HI, I am learning javascript, and at the moment I am working on truth tables. Can someone please tell me, is "NOT A AND B" the same as "NOT A AND NOT B". Thanks
4
4762
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record onto the bottom of the list (even though it keeps its record number). Also, There are certin names that i click on the list, and it will not bring it up, rather it brings to the first record (no matter how many times i try going to that...
7
2029
by: carl.manaster | last post by:
Hi, I'd like to take a string containing MSIL code, assemble it, execute it, and receive the result all from my running C# application. So far I've managed to manually create some MSIL code that I can successfully assemble with ilasm and execute at the DOS prompt, and I've read up on System.Reflection.Emit and CodeDom, but I don't see how to do this. It looks like I would have to write a whole System.CodeDom.Compiler.CodeCompiler; I...
1
1823
by: John Doe | last post by:
Hi all, I have a lot of confusion about what this runtime environment is. When I write an application with unmanaged code and unmanaged data, can I compile it to the MSIL, or it will compile mandatorily to the x86 instruction set?
3
1653
by: Mark Fox | last post by:
Hello, I have read a lot about how the .NET Framework uses MSIL as its intermediate language. If I have a project in C# in VS.NET 2003, how do I get the MSIL for it so I could look at it? Better yet, I would like to obfuscate it using the Dotfuscator Community Edition and then get the obfuscated MSIL into a text file of some sort. How would I do this? Thanks for your help!
9
1393
by: João Santa Bárbara | last post by:
Hi all, i have instaled VS2005 Develpers Edition, and i have migrate my VB code from VS2003 to VS2005(RTM). and so far i´m not pleased with this migration. i have lots of ide Bugs, some forms in designer explodes. :( other problem is in the VB Compiler that explodes with this error "AppName: devenv.exe AppVer: 8.0.50727.42 AppStamp:4333e699" and force the IDE to Close
3
1186
by: Thom Anderson | last post by:
Hi. I have been asked to create a web tool for my company. Basically an employee will use a user control (a tree view containing information about our company) and when they get to where they want on the tree, the will click a node. The node click event should go to the (database, cache, session var, xml file (it doesn't matter at this time)) and return a list of reports that can be run. That list of reports is dependent on two...
0
10106
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
10039
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
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
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
7461
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
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4009
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
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.