Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Thu, 11 May 2006 13:02:01 -0700,    group: microsoft.public.exchange2000.development        back       


ServicedComponent not initializing???   
Hey guys,

    Excuse my ignorance in this matter, but I'm both new to C# and the 
Exchange SDK. I'm creating a very basic program for testing purposes and for 
an upcoming project. 

I'm looking at a piece of example code that I found on the net and the text 
"ServicedComponent" is giving me an error.

The code below looks like this:

----------------------------------------------------------------------------------------
    public class ExchSink : ServicedComponent, IExStoreAsyncEvents
    {
        public string ClassID = "F92EFC3A-FDD8-4225-B005-13FD3D5D54D1";
        public string InterfaceId = "704A413F-F8FE-476B-9206-69AB6300D752";
        public string EventsId = "DCC71BD5-6627-4FBF-BB5A-DB8FEA1EB177";

        public void OnDelete(IExStoreEventInfo pEventInfo, string 
bstrURLItem, int lFlags)
        {
            try
            { }
            catch (Exception ex)
            { throw (ex); }
        }
----------------------------------------------------------------------------------------


The error I'm getting is:
"Error	2	The type or namespace name 'ServicedComponent' could not be found 
(are you missing a using directive or an assembly reference?)"



Any idea what I need to do?


Thanks!!!
date: Thu, 11 May 2006 13:02:01 -0700   author:   Todd Jaspers

RE: ServicedComponent not initializing???   
I did some research and it looks like it needs "using 
System.EnterpriseServices;" added to the code as well. I have, but that 
reference doesn't seem to exist. What reference do I need to add before it 
will no longer error out on that line?

That line gives me the following error:

"Error	1	The type or namespace name 'EnterpriseServices' does not exist in 
the namespace 'System' (are you missing an assembly reference?)"
date: Thu, 11 May 2006 13:31:02 -0700   author:   Todd Jaspers

Re: ServicedComponent not initializing???   
Hello Todd,

you must add an assembly reference for System.EnterpriseServices to your 
project.

Are you working with Visual Studio? If yes, right-click on References in the 
project view and click "Add reference". Scroll down to the 
System.EnterpriseServices and click "Add". That should do it.

Greetings,
Henning Krause

"Todd Jaspers"  wrote in message 
news:4D6A4A57-B11C-41E8-8E40-0619D3C72423@microsoft.com...
>I did some research and it looks like it needs "using
> System.EnterpriseServices;" added to the code as well. I have, but that
> reference doesn't seem to exist. What reference do I need to add before it
> will no longer error out on that line?
>
> That line gives me the following error:
>
> "Error 1 The type or namespace name 'EnterpriseServices' does not exist in
> the namespace 'System' (are you missing an assembly reference?)"
date: Fri, 12 May 2006 00:06:30 +0200   author:   Henning Krause [Exchange]

Re: ServicedComponent not initializing???   
Thanks Henning,

     This worked. I really appreciate it.



Todd


"Henning Krause [Exchange]" wrote:

> Hello Todd,
> 
> you must add an assembly reference for System.EnterpriseServices to your 
> project.
> 
> Are you working with Visual Studio? If yes, right-click on References in the 
> project view and click "Add reference". Scroll down to the 
> System.EnterpriseServices and click "Add". That should do it.
> 
> Greetings,
> Henning Krause
> 
> "Todd Jaspers"  wrote in message 
> news:4D6A4A57-B11C-41E8-8E40-0619D3C72423@microsoft.com...
> >I did some research and it looks like it needs "using
> > System.EnterpriseServices;" added to the code as well. I have, but that
> > reference doesn't seem to exist. What reference do I need to add before it
> > will no longer error out on that line?
> >
> > That line gives me the following error:
> >
> > "Error 1 The type or namespace name 'EnterpriseServices' does not exist in
> > the namespace 'System' (are you missing an assembly reference?)" 
> 
>
date: Fri, 12 May 2006 06:19:02 -0700   author:   Todd Jaspers

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us