Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Directory Import with COM+ object

Status
Not open for further replies.

allanrxx

Programmer
Feb 25, 2004
12
0
0
US
Hi,

I am trying to do a directory import via an ASP page that calls a COM+ component which tries to run the following commands(2 lines...2nd line may wrap)..

...
set oWS=server.createobject("WScript.shell")

ret=oWS.Run("c:\exchsrvr\bin\admin /i
c:\webhost\newsite\exchange\imports\" & myFile & " /d TESTEXCHANGE", 2, false)
...

The web server that I'm running the asp page and component on is a Windows 2k Server machine. I also have the Exchange Server Administrator loaded on the web server. The Exchange server is running Exchange 5.5 on NT 4 and both machines are part of a NT 4 domain.

The component that contains the code above is a .wsc component. I imported that component into a COM+ wrapper so I can set the user account that it should run under. I set it to run as the domain administrator(for testing).

The only way I can get this to run successfully is if I give the Everyone group admin rights at the site level in the Exchange Administrator. I've tried adding the domain administrator as well as all of the domain users as Exchange admins, but had no success without adding the Everyone group. The error I get is:

Source: MSExchangeDSImp
Event ID: 181
Description: Could not bind to the Microsoft Exchange Directory server TESTEXCHANGE. You do not have the permissions required to complete the operation.

What am I missing? I logged onto the machine as domain admin, set the COM to run as domain admin, and even tried logging into the ASP page as domain admin. I added code to return the user and domain that the COM claims to be running as when the process gets started and it tells me it's running as domain admin.

I'm very new to Exchange, so maybe I'm just missing a simple security setting somewhere in the Exchange admin.

Thank you very much in advance,
Allan


 
Exchange uses its own permissions, it's not based on the default NT admin groups. The account you're accessing Exchange through to do directory imports and exports needs admin permissions granting in the Exchange directory itself, via the Exchange Admin program.
 
I narrowed it down that the 'Network' account has to have admin permissions in Exchange.

Even though I'm telling the COM to run as domain admin, because I'm running the COM from another server other than the Exchange machine, will Exchange always see the user trying to run the update as the 'Network' user account? Is there any way to force it to use 'Administrator' or some other account? I'm not sure now if this question is more COM related or Exchange related, or both.

Thanks for the response!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top