Re: Fail to logon to Exchange with CDO 1.21 under local account

From: Tom Rizzo [MSFT] (thomriz_at_microsoft.com)
Date: 06/07/04


Date: Mon, 7 Jun 2004 15:10:23 -0700

Sounds like an authentication problem. What account do you run under in
task scheduler? Also, there may be an issue running in the task scheduler
with accessing registry hives which MAPI needs to do.

Check out http://support.microsoft.com/default.aspx?scid=kb;en-us;177851

-- 
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint?  Check out http://www.microsoft.com/MSPress/books/5517.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mark Bridges" <anonymous@discussions.microsoft.com> wrote in message
news:D3E7CF76-F6B3-44A8-B19D-589C8AE160DF@microsoft.com...
> I've written a script to take data from SQL 2000, create a persistent
recordset (adtg file) and save the adtg file in a Public Folder.  Exchange,
SQL 2000 and the W2K server where the script resides are separate Windows
2000 servers.  The script runs as a Scheduled Task on the Windows 2000
Server and runs under a local account.  The local account has read/write
permissions to the drive where the script resides.  The script creates a
MAPI session using an account that has permission to logon to Exchange and
populate a public folder.  I'm using CDO 1.21 on the W2K server to create a
MAPI session.  Any attempts to run the script produces an "Enter Password"
dialogue box with fields for the domain user, password and domain name.  I
want the script to run on a regular schedule regardless of who is logged
onto the system so I can't have an interactive dialogue box displayed.  In
production, I will not be able to use Exchange Event Scripting; it must run
on a separate server.  The code I'm using to create a temporary MAPI session
is as follows:
>
> loginText = "User01"
> serverName = "MAIL01"
> strProfileInfo = serverName & vbLf & loginText
> Set objSession = CreateObject("MAPI.Session")
> objSession.Logon = "", "", False, True, 0, True, strProfileInfo
>
> According to what I have read, the above code should create a MAPI session
without a profile dialogue box appearing.  Although no profile box appears,
an "Enter Password" box does.  If I enter the credentials of the Exchange
account with permission to write to the public folder when the dialogue box
appears, the script runs without a problem.  Does anyone know of a way to
accomplish this without the dialogue box display? What security token is
causing the dialogue box to appear and is there a way to satisfy the
permission requirements in this type of environment.  Any help would be
greatly appreciated.
>
> Regards,
> Mark
>
>


Relevant Pages

  • Re: script will not run as a scheduled service unless logged on
    ... run the script interactively, and I can run the script as a scheduled job ... OK, at this point, when you say *you* are logged on, what account are you ... The task scheduler log does not report the detail of the error. ... I have already given Batch user full access to cscript.exe, ...
    (microsoft.public.windows.server.scripting)
  • Re: Copy files to another computer
    ... > I want to copy files to the share on the another server during every ... > Script have to somehow log in. ... Create an account on each machine with administrative ... The Task Scheduler will ...
    (microsoft.public.windows.server.general)
  • Protecting against dDOS bots (was: Newbie php problem)
    ... The form mail script posted that was used, ... requires the applicant to pass some kind of Turing test, ... Turing test if the account balance ever drops to zero. ... Log into the same account repeatedly, which consumes your credit ...
    (alt.php)
  • Re: Entourage account setup applescript not working
    ... I pasted the script at the end just in case. ... When comparing the account settings on 2 computers, ... This script assists a user with the setup of his Exchange account ... Customize the network and server properties below with information ...
    (microsoft.public.mac.office.entourage)
  • Re: Error 15401 using sp_grantlogin (not addressed by current KB articles)
    ... Restarting Windows 2000 resolved the problem for this particular account, ... confused when it sees a duplicate SID. ... > One way to get SQL Server to agree with the renamed NT ... > Preview (to ensure the script was created), ...
    (microsoft.public.sqlserver.security)