c# - Invalid Token Error, ADSI & Tracing

c# - Invalid Token Error, ADSI & Tracing

Post by Rajesh Abraha » Mon, 07 Jul 2003 17:30:49

I am posting this in this newsgroup because I found some
discussions related to ADSI and this error

I had a Windows Forms Project which had a Class
File "AdUser.cs" which represents a Active Directory User
and had methods & Properties to Get and set HomeDirectory
etc. Every thing was fine.

I then descide to make my app multi tear and moved my
AdUser.cs to a seperate Class Project (AdData.csproj) and
everything still worked fine until I descided to move the
tracing functionality to the Class Project by creating a
seperate app.config file in that project. Also copied the
code below to the AdUser.cs.

                TextWriterTraceListener textListener = new

                TraceSwitch adDataSwitch= new TraceSwitch
("AdDaTrace","Trace for Ad Data Layer");

At the Trace.Listner.Add( , I get the below error.

Invalid token '(' in class, struct, or interface member

Any Idea?

Rajesh Abraham Chacko


c# - Invalid Token Error, ADSI & Tracing

Post by Rajesh Abraha » Mon, 07 Jul 2003 23:16:21

Just found out that if I place the tracing Code inside a
method or the constructor then I don't get any error. I
still do not know why.


Rajesh Abraham Chacko


1. The token supplied to the function is invalid ID no:80090308

When trying to expand public folder in Exchange System Manager, receiving the
following message:

The token supplied to the function is invalid.
ID no: 80090308
Exchange System Manager

Running SBS 2003 (no service packs)

Modified ExAdmin per
http://support.microsoft.com/default.aspx?scid=kb;EN-US;324345. Still unable
to expand Public Folders. Restarted IIS. Restarted Exchange System Attendant.
Still unable to expand Public Folders. After searching numerous articles,
tried rebooting server since it is requesting it after performing Windows
Updates (not service packs though). SSL certificate does not appear to be
removed from VD as it still prompts if I direct a browser to it and it still
has the View/Edit box available.

Any help would be appreciated.

2. BizTalk Messaging Service appears unstable!

3. error with C# and .NET w/ADSI

4. Technology


6. SunSparcstation 1/1+ Audio Out/In

7. IBM Token Ring & DSL

8. Agile Manifesto for Network Engineering

9. Token Ring & SBS 4.5

10. SMS & Token Ring

11. XPATH contains() function error: Script Execution Error: Wrong number of arguments or invalid property assignment

12. How do I use ADSI from a C# client application

13. C# ADSI probs on remote clients