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.
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. >