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: Mon, 21 Nov 2005 11:31:46 +0100,    group: microsoft.public.exchange2000.development        back       


Mail Enable Group with VS.Net   
Hi

I try to create a mail enabled group with an ASP.Net web application.

When I run the code below in dubg mode I recive This error:
    "Error HRESULT E_FAIL has been returned from a call to a COM component." 
Error Code: -2147467259

On the Website the error displayed is:
    An operations error occurred. (Exception from HRESULT: 0x80072020)

My Code
        'Dim strLDAPPath As String = 
"LDAP://domain.net/CN=User1,OU=test,DC=domain,DC=net"

        Dim ADGroup As New DirectoryEntry(strLDAPPath, 
ConfigurationManager.AppSettings("ExUser"), 
ConfigurationManager.AppSettings("ExPassword"))
        Dim mbx As IMailRecipient = ADGroup.NativeObject
        mbx.MailEnable()                            <-- This line gets the 
error
        ADGroup.CommitChanges()

We use Exchange Server 2003 und VS.Net 2005.

Thanks for any help.
date: Mon, 21 Nov 2005 11:31:46 +0100   author:   Thomas se

Re: Mail Enable Group with VS.Net   
Support for using CDOEXM is ASP.NET and ASP was recently drop because Quote

 "Important  Because of issues with multiple-hop authentication and 
unexpected results observed in multithreaded runtime environments, 
Microsoft does not support using CDO for Exchange Management (CDOEXM) in 
Microsoft ASP.NET pages, ASP Web pages or in Web services. To create 
Web-based Microsoft Exchange management applications that use CDOEXM 
functionality, Microsoft recommends wrapping CDOEXM in a Distributed 
Component Object Model (DCOM) package and calling that package from your 
application." ref 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_techsel_tech_4.asp

CDOEXM doesn't support using alternate credentials so it will always use the 
security context of the calling process what this is will depend on whether 
your using impersonation or not. Then if your not running this code on a DC 
when that process needs to make the call outside the local server to 
complete this request for authentication to work sucessfuly here you need to 
have delegation configured correctly. From a security perspective its a much 
better idea to wrap this all in a COM package.

Cheers
Glen


"Thomas" <No@spam.please> wrote in message 
news:et9MIbo7FHA.252@TK2MSFTNGP15.phx.gbl...
> Hi
>
> I try to create a mail enabled group with an ASP.Net web application.
>
> When I run the code below in dubg mode I recive This error:
>    "Error HRESULT E_FAIL has been returned from a call to a COM 
> component." Error Code: -2147467259
>
> On the Website the error displayed is:
>    An operations error occurred. (Exception from HRESULT: 0x80072020)
>
> My Code
>        'Dim strLDAPPath As String = 
> "LDAP://domain.net/CN=User1,OU=test,DC=domain,DC=net"
>
>        Dim ADGroup As New DirectoryEntry(strLDAPPath, 
> ConfigurationManager.AppSettings("ExUser"), 
> ConfigurationManager.AppSettings("ExPassword"))
>        Dim mbx As IMailRecipient = ADGroup.NativeObject
>        mbx.MailEnable()                            <-- This line gets the 
> error
>        ADGroup.CommitChanges()
>
> We use Exchange Server 2003 und VS.Net 2005.
>
> Thanks for any help.
>
date: Tue, 22 Nov 2005 10:24:36 +1100   author:   Glen Scales [MVP]

Google
 
Web ureader.com


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