Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: Re: MAPI_E_NOT_FOUND(8004010F)


Message #1 by "jack klon" <jack_klon@y...> on Tue, 4 Feb 2003 15:31:57
> Hi guys , I need your help.
> 
> I'll explain first the background. I'm part of an organisation with 
let's 
> say 60 people. This organisation is running under a windows 2000 server 
> with a web server (IIS5). Let's call it "BART" and let's say i'm the 
> administrator of this server. The organisation is also running an 
exchange 
> server (version 5.5). Let's call it "HOMER". Let's say i don't have any 
> administrative right on this server. Every member of this organisation 
has 
> a valid computer account and a valid mailbox on the network. 
> The boss of this organisation asked me to produce an online form that 
any 
> staff could complete to ask for special leaves. The boss want that once 
> the staff submit the form, it sends automatically the data from his 
> mailbox to his supervisor mailbox --> It is the important point. So that 
> the supervisor can approved the form. The system of form I'm using is 
> Acrobat form, but it is not important. 
> The online form is located on the intranet. It is hosted on "BART". Once 
> the submit button is pressed, it is calling an ASP page located still 
> on "BART". The ASP page asks the user to authenticate using the Basic 
> authentication from Windows NT so the script look up the LDAP directory 
> from the exchange server to find the user mailbox. Finally it logon to 
the 
> user mailbox and send the mail. 
> 
> Here is the part of the code which logs into the user mailbox and send 
the 
> mail:
> 
> '------------------------------------------------------------------------
> '-- Create the MAPI Session object. 
> Set objSession = Server.CreateObject("MAPI.Session")
> 
> '-- Build Profile from server and mailbox name info
> '-- Exchange Server will Dynanically build Profile
> bstrProfileInfo = strMailServer + vbLF + strMailBox
> 
> '-- Login to the authenticated user mailbox
> objSession.Logon "", "", False, True, 0, True, bstrProfileInfo
> 
> Set objOutbox = objSession.Outbox
> Set objNewMessage = objOutbox.Messages.Add
> Set objRecipients = objNewMessage.Recipients
> Set objOneRecip = objRecipients.Add
> 	
> With objOneRecip	
>       .Name = strMailRecipName		'-- Creation of the 
recipient
>       '.Type = ActMsgTo
>       .Resolve '-- Get MAPI to determine complete E-mail address.
> End With
> 
> With objNewMessage
>      .Subject = strMailSubject  '-- Subject of the mail
>      .Text =  strMailText	'-- Message of the mail
>      Set objAttachment = .Attachments.Add
>        	With objAttachment
>             .Position = 0	
>             .Name = "Admin01.pdf"	'-- Display name of the attachment
>             .Type = 1
> 	    .Source = strTemp		'-- Source of the attachment
>             .ReadFromFile strTemp	'-- Attach the file
>         End With
> 	    .Sensitivity = 3
> 	    .Sent = False
> 	    .Submitted = False
> 	    .Unread = True
>     	    .Update				'-- Update the message
>             .Send(false) '-- Send the Mail without saving it in "save 
> items"
>     End With
> 
> objSession.Logoff
> Set objOutbox = Nothing 
> Set objNewMessage = Nothing 
> Set objRecipients = Nothing 
> Set objOneRecip = Nothing 
> 
> '-----------------------------------------------------------------------
> 
> This is working fine when I logged into the asp page with my username 
and 
> password. I can submit the form, I logged using the BASIC NT 
> authentication, my mailbox is found into the LDAP directory, the ASP 
page 
> logon into my mailbox and send the mail.
> Once someone else from the organisation tries to do it, the process 
fails 
> at the point when the script tries to logon into the user mailbox. 
> 
> The asp page gives out the following erro  message:
> '------------------------------------------------------------
> 
> #Collaboration Data Objects error '000004f7' 
> 
> [Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]] 
> 
> /Admin01/script/submit_admin01.asp, line 262 
> 
> '------------------------------------------------------------
> 
> But the user do excatly the same things that i do. He is succesfully 
> authenticated by the system, his mailbox his found into the LDAP 
directory 
> but it fails to login to his mailbox. The user is connecting to the ASP 
> page from his workstation machine where he is logged with his computer 
> account details.
> 
> On "BART" it is installed OUTLOOK 2000.
> 
> So if you have any idea or suggestion, they are more thant welcome. If 
you 
> wnat more details , please don't hesitate to ask. At some point my 
> thinking might be wrong. I'm fairly new using this technology, so I 
might 
> miss a step. Please help.
> 
> Thank you.
> 
> David
Message #2 by "Luiz Frederick Cassiano" <lfred@u...> on Wed, 5 Feb 2003 12:38:23
Hi,

I read your explanation, and you didn't mentioned about rights on NT 
Server.
When you have IIS and exchange on diferent server you must use Basic 
Authentication. You did it. Ok

But you have to give for all user who will access to your 
application "local logon right" on the server.

Im my application I was having this problem. It was running perfectly with 
administrator profile ( who has this right ), but when a single user was 
trying to run, I got logon failed on Exchange Server.

This change makes my application run.

But now I have another problem. Sometimes it works fine, but when a user 
run this application many times, suddenly the logon on exchange server 
fail.

My application is the same of yours, but Im my case Im using CDO to add a 
new appointment on the user's calendar.

And Im instanciating and destroying mapi session on Session_onStart/End in 
global asa file.
This is because my IIS was keeping variables on memory, so I have to force 
to destroying.

I hope it help you. Dont forget to say me if it work for you.

Fred
Web Developer
Tenaris Group
Brazil


> > Hi guys , I need your help.
>>  
>>  I'll explain first the background. I'm part of an organisation with 
l> et's 
>>  say 60 people. This organisation is running under a windows 2000 
server 
>>  with a web server (IIS5). Let's call it "BART" and let's say i'm the 
>>  administrator of this server. The organisation is also running an 
e> xchange 
>>  server (version 5.5). Let's call it "HOMER". Let's say i don't have 
any 
>>  administrative right on this server. Every member of this organisation 
h> as 
>>  a valid computer account and a valid mailbox on the network. 
>>  The boss of this organisation asked me to produce an online form that 
a> ny 
>>  staff could complete to ask for special leaves. The boss want that 
once 
>>  the staff submit the form, it sends automatically the data from his 
>>  mailbox to his supervisor mailbox --> It is the important point. So 
that 
>>  the supervisor can approved the form. The system of form I'm using is 
>>  Acrobat form, but it is not important. 
>>  The online form is located on the intranet. It is hosted on "BART". 
Once 
>>  the submit button is pressed, it is calling an ASP page located still 
>>  on "BART". The ASP page asks the user to authenticate using the Basic 
>>  authentication from Windows NT so the script look up the LDAP 
directory 
>>  from the exchange server to find the user mailbox. Finally it logon to 
t> he 
>>  user mailbox and send the mail. 
>>  
>>  Here is the part of the code which logs into the user mailbox and send 
t> he 
>>  mail:
>>  
>>  '----------------------------------------------------------------------
--
>>  '-- Create the MAPI Session object. 
>>  Set objSession = Server.CreateObject("MAPI.Session")
>>  
>>  '-- Build Profile from server and mailbox name info
>>  '-- Exchange Server will Dynanically build Profile
>>  bstrProfileInfo = strMailServer + vbLF + strMailBox
>>  
>>  '-- Login to the authenticated user mailbox
>>  objSession.Logon "", "", False, True, 0, True, bstrProfileInfo
>>  
>>  Set objOutbox = objSession.Outbox
>>  Set objNewMessage = objOutbox.Messages.Add
>>  Set objRecipients = objNewMessage.Recipients
>>  Set objOneRecip = objRecipients.Add
>>  	
>>  With objOneRecip	
>>        .Name = strMailRecipName		'-- Creation of the 
r> ecipient
>>        '.Type = ActMsgTo
>>        .Resolve '-- Get MAPI to determine complete E-mail address.
>>  End With
>>  
>>  With objNewMessage
>>       .Subject = strMailSubject  '-- Subject of the mail
>>       .Text =  strMailText	'-- Message of the mail
>>       Set objAttachment = .Attachments.Add
>>         	With objAttachment
>>              .Position = 0	
>>              .Name = "Admin01.pdf"	'-- Display name of the attachment
>>              .Type = 1
>>  	    .Source = strTemp		'-- Source of the attachment
>>              .ReadFromFile strTemp	'-- Attach the file
>>          End With
>>  	    .Sensitivity = 3
>>  	    .Sent = False
>>  	    .Submitted = False
>>  	    .Unread = True
>>      	    .Update				'-- Update the 
message
>>              .Send(false) '-- Send the Mail without saving it in "save 
>>  items"
>>      End With
>>  
>>  objSession.Logoff
>>  Set objOutbox = Nothing 
>>  Set objNewMessage = Nothing 
>>  Set objRecipients = Nothing 
>>  Set objOneRecip = Nothing 
>>  
>>  '----------------------------------------------------------------------
-
>>  
>>  This is working fine when I logged into the asp page with my username 
a> nd 
>>  password. I can submit the form, I logged using the BASIC NT 
>>  authentication, my mailbox is found into the LDAP directory, the ASP 
p> age 
>>  logon into my mailbox and send the mail.
>>  Once someone else from the organisation tries to do it, the process 
f> ails 
>>  at the point when the script tries to logon into the user mailbox. 
>>  
>>  The asp page gives out the following erro  message:
>>  '------------------------------------------------------------
>>  
>>  #Collaboration Data Objects error '000004f7' 
>>  
>>  [Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]] 
>>  
>>  /Admin01/script/submit_admin01.asp, line 262 
>>  
>>  '------------------------------------------------------------
>>  
>>  But the user do excatly the same things that i do. He is succesfully 
>>  authenticated by the system, his mailbox his found into the LDAP 
d> irectory 
>>  but it fails to login to his mailbox. The user is connecting to the 
ASP 
>>  page from his workstation machine where he is logged with his computer 
>>  account details.
>>  
>>  On "BART" it is installed OUTLOOK 2000.
>>  
>>  So if you have any idea or suggestion, they are more thant welcome. If 
y> ou 
>>  wnat more details , please don't hesitate to ask. At some point my 
>>  thinking might be wrong. I'm fairly new using this technology, so I 
m> ight 
>>  miss a step. Please help.
>>  
>>  Thank you.
>>  
>>  David
Message #3 by "Erik Danielsen" <erik.steen@o...> on Thu, 6 Feb 2003 11:40:52
HOW and where do you set these "local logon right"

> Hi,

> I read your explanation, and you didn't mentioned about rights on NT 
S> erver.
W> hen you have IIS and exchange on diferent server you must use Basic 
A> uthentication. You did it. Ok

> But you have to give for all user who will access to your 
a> pplication "local logon right" on the server.

> Im my application I was having this problem. It was running perfectly 
with 
a> dministrator profile ( who has this right ), but when a single user was 
t> rying to run, I got logon failed on Exchange Server.

> This change makes my application run.

> But now I have another problem. Sometimes it works fine, but when a user 
r> un this application many times, suddenly the logon on exchange server 
f> ail.

> My application is the same of yours, but Im my case Im using CDO to add 
a 
n> ew appointment on the user's calendar.

> And Im instanciating and destroying mapi session on Session_onStart/End 
in 
g> lobal asa file.
T> his is because my IIS was keeping variables on memory, so I have to 
force 
t> o destroying.

> I hope it help you. Dont forget to say me if it work for you.

> Fred
W> eb Developer
T> enaris Group
B> razil

> 
>>  > Hi guys , I need your help.
>> >  
>> >  I'll explain first the background. I'm part of an organisation with 
l> > et's 
>> >  say 60 people. This organisation is running under a windows 2000 
s> erver 
>> >  with a web server (IIS5). Let's call it "BART" and let's say i'm the 
>> >  administrator of this server. The organisation is also running an 
e> > xchange 
>> >  server (version 5.5). Let's call it "HOMER". Let's say i don't have 
a> ny 
>> >  administrative right on this server. Every member of this 
organisation 
h> > as 
>> >  a valid computer account and a valid mailbox on the network. 
>> >  The boss of this organisation asked me to produce an online form 
that 
a> > ny 
>> >  staff could complete to ask for special leaves. The boss want that 
o> nce 
>> >  the staff submit the form, it sends automatically the data from his 
>> >  mailbox to his supervisor mailbox --> It is the important point. So 
t> hat 
>> >  the supervisor can approved the form. The system of form I'm using 
is 
>> >  Acrobat form, but it is not important. 
>> >  The online form is located on the intranet. It is hosted on "BART". 
O> nce 
>> >  the submit button is pressed, it is calling an ASP page located 
still 
>> >  on "BART". The ASP page asks the user to authenticate using the 
Basic 
>> >  authentication from Windows NT so the script look up the LDAP 
d> irectory 
>> >  from the exchange server to find the user mailbox. Finally it logon 
to 
t> > he 
>> >  user mailbox and send the mail. 
>> >  
>> >  Here is the part of the code which logs into the user mailbox and 
send 
t> > he 
>> >  mail:
>> >  
>> >  '--------------------------------------------------------------------
--
-> -
>> >  '-- Create the MAPI Session object. 
>> >  Set objSession = Server.CreateObject("MAPI.Session")
>> >  
>> >  '-- Build Profile from server and mailbox name info
>> >  '-- Exchange Server will Dynanically build Profile
>> >  bstrProfileInfo = strMailServer + vbLF + strMailBox
>> >  
>> >  '-- Login to the authenticated user mailbox
>> >  objSession.Logon "", "", False, True, 0, True, bstrProfileInfo
>> >  
>> >  Set objOutbox = objSession.Outbox
>> >  Set objNewMessage = objOutbox.Messages.Add
>> >  Set objRecipients = objNewMessage.Recipients
>> >  Set objOneRecip = objRecipients.Add
>> >  	
>> >  With objOneRecip	
>> >        .Name = strMailRecipName		'-- Creation of the 
r> > ecipient
>> >        '.Type = ActMsgTo
>> >        .Resolve '-- Get MAPI to determine complete E-mail address.
>> >  End With
>> >  
>> >  With objNewMessage
>> >       .Subject = strMailSubject  '-- Subject of the mail
>> >       .Text =  strMailText	'-- Message of the mail
>> >       Set objAttachment = .Attachments.Add
>> >         	With objAttachment
>> >              .Position = 0	
>> >              .Name = "Admin01.pdf"	'-- Display name of the attachment
>> >              .Type = 1
>> >  	    .Source = strTemp		'-- Source of the attachment
>> >              .ReadFromFile strTemp	'-- Attach the file
>> >          End With
>> >  	    .Sensitivity = 3
>> >  	    .Sent = False
>> >  	    .Submitted = False
>> >  	    .Unread = True
>> >      	    .Update				'-- Update the 
m> essage
>> >              .Send(false) '-- Send the Mail without saving it 
in "save 
>> >  items"
>> >      End With
>> >  
>> >  objSession.Logoff
>> >  Set objOutbox = Nothing 
>> >  Set objNewMessage = Nothing 
>> >  Set objRecipients = Nothing 
>> >  Set objOneRecip = Nothing 
>> >  
>> >  '--------------------------------------------------------------------
--
-> 
>> >  
>> >  This is working fine when I logged into the asp page with my 
username 
a> > nd 
>> >  password. I can submit the form, I logged using the BASIC NT 
>> >  authentication, my mailbox is found into the LDAP directory, the ASP 
p> > age 
>> >  logon into my mailbox and send the mail.
>> >  Once someone else from the organisation tries to do it, the process 
f> > ails 
>> >  at the point when the script tries to logon into the user mailbox. 
>> >  
>> >  The asp page gives out the following erro  message:
>> >  '------------------------------------------------------------
>> >  
>> >  #Collaboration Data Objects error '000004f7' 
>> >  
>> >  [Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]] 
>> >  
>> >  /Admin01/script/submit_admin01.asp, line 262 
>> >  
>> >  '------------------------------------------------------------
>> >  
>> >  But the user do excatly the same things that i do. He is succesfully 
>> >  authenticated by the system, his mailbox his found into the LDAP 
d> > irectory 
>> >  but it fails to login to his mailbox. The user is connecting to the 
A> SP 
>> >  page from his workstation machine where he is logged with his 
computer 
>> >  account details.
>> >  
>> >  On "BART" it is installed OUTLOOK 2000.
>> >  
>> >  So if you have any idea or suggestion, they are more thant welcome. 
If 
y> > ou 
>> >  wnat more details , please don't hesitate to ask. At some point my 
>> >  thinking might be wrong. I'm fairly new using this technology, so I 
m> > ight 
>> >  miss a step. Please help.
>> >  
>> >  Thank you.
>> >  
>> >  David
Message #4 by CASSIANO Luiz F CONFAB <TERLFR@c...> on Thu, 6 Feb 2003 09:31:50 -0200
On your Win2k, in Administrative Tools, Local Security Police.


-----Original Message-----
From: Erik Danielsen [mailto:erik.steen@o...]
Sent: quinta-feira, 6 de fevereiro de 2003 09:41
To: ASP CDO
Subject: [asp_cdo] Re: MAPI_E_NOT_FOUND(8004010F)


HOW and where do you set these "local logon right"

> Hi,

> I read your explanation, and you didn't mentioned about rights on NT 
S> erver.
W> hen you have IIS and exchange on diferent server you must use Basic 
A> uthentication. You did it. Ok

> But you have to give for all user who will access to your 
a> pplication "local logon right" on the server.

> Im my application I was having this problem. It was running perfectly 
with 
a> dministrator profile ( who has this right ), but when a single user was 
t> rying to run, I got logon failed on Exchange Server.

> This change makes my application run.

> But now I have another problem. Sometimes it works fine, but when a user 
r> un this application many times, suddenly the logon on exchange server 
f> ail.

> My application is the same of yours, but Im my case Im using CDO to add 
a 
n> ew appointment on the user's calendar.

> And Im instanciating and destroying mapi session on Session_onStart/End 
in 
g> lobal asa file.
T> his is because my IIS was keeping variables on memory, so I have to 
force 
t> o destroying.

> I hope it help you. Dont forget to say me if it work for you.

> Fred
W> eb Developer
T> enaris Group
B> razil

> 
>>  > Hi guys , I need your help.
>> >  
>> >  I'll explain first the background. I'm part of an organisation with 
l> > et's 
>> >  say 60 people. This organisation is running under a windows 2000 
s> erver 
>> >  with a web server (IIS5). Let's call it "BART" and let's say i'm the 
>> >  administrator of this server. The organisation is also running an 
e> > xchange 
>> >  server (version 5.5). Let's call it "HOMER". Let's say i don't have 
a> ny 
>> >  administrative right on this server. Every member of this 
organisation 
h> > as 
>> >  a valid computer account and a valid mailbox on the network. 
>> >  The boss of this organisation asked me to produce an online form 
that 
a> > ny 
>> >  staff could complete to ask for special leaves. The boss want that 
o> nce 
>> >  the staff submit the form, it sends automatically the data from his 
>> >  mailbox to his supervisor mailbox --> It is the important point. So 
t> hat 
>> >  the supervisor can approved the form. The system of form I'm using 
is 
>> >  Acrobat form, but it is not important. 
>> >  The online form is located on the intranet. It is hosted on "BART". 
O> nce 
>> >  the submit button is pressed, it is calling an ASP page located 
still 
>> >  on "BART". The ASP page asks the user to authenticate using the 
Basic 
>> >  authentication from Windows NT so the script look up the LDAP 
d> irectory 
>> >  from the exchange server to find the user mailbox. Finally it logon 
to 
t> > he 
>> >  user mailbox and send the mail. 
>> >  
>> >  Here is the part of the code which logs into the user mailbox and 
send 
t> > he 
>> >  mail:
>> >  
>> >  '--------------------------------------------------------------------
--
-> -
>> >  '-- Create the MAPI Session object. 
>> >  Set objSession = Server.CreateObject("MAPI.Session")
>> >  
>> >  '-- Build Profile from server and mailbox name info
>> >  '-- Exchange Server will Dynanically build Profile
>> >  bstrProfileInfo = strMailServer + vbLF + strMailBox
>> >  
>> >  '-- Login to the authenticated user mailbox
>> >  objSession.Logon "", "", False, True, 0, True, bstrProfileInfo
>> >  
>> >  Set objOutbox = objSession.Outbox
>> >  Set objNewMessage = objOutbox.Messages.Add
>> >  Set objRecipients = objNewMessage.Recipients
>> >  Set objOneRecip = objRecipients.Add
>> >  	
>> >  With objOneRecip	
>> >        .Name = strMailRecipName		'-- Creation of the 
r> > ecipient
>> >        '.Type = ActMsgTo
>> >        .Resolve '-- Get MAPI to determine complete E-mail address.
>> >  End With
>> >  
>> >  With objNewMessage
>> >       .Subject = strMailSubject  '-- Subject of the mail
>> >       .Text =  strMailText	'-- Message of the mail
>> >       Set objAttachment = .Attachments.Add
>> >         	With objAttachment
>> >              .Position = 0	
>> >              .Name = "Admin01.pdf"	'-- Display name of the attachment
>> >              .Type = 1
>> >  	    .Source = strTemp		'-- Source of the attachment
>> >              .ReadFromFile strTemp	'-- Attach the file
>> >          End With
>> >  	    .Sensitivity = 3
>> >  	    .Sent = False
>> >  	    .Submitted = False
>> >  	    .Unread = True
>> >      	    .Update				'-- Update the 
m> essage
>> >              .Send(false) '-- Send the Mail without saving it 
in "save 
>> >  items"
>> >      End With
>> >  
>> >  objSession.Logoff
>> >  Set objOutbox = Nothing 
>> >  Set objNewMessage = Nothing 
>> >  Set objRecipients = Nothing 
>> >  Set objOneRecip = Nothing 
>> >  
>> >  '--------------------------------------------------------------------
--
-> 
>> >  
>> >  This is working fine when I logged into the asp page with my 
username 
a> > nd 
>> >  password. I can submit the form, I logged using the BASIC NT 
>> >  authentication, my mailbox is found into the LDAP directory, the ASP 
p> > age 
>> >  logon into my mailbox and send the mail.
>> >  Once someone else from the organisation tries to do it, the process 
f> > ails 
>> >  at the point when the script tries to logon into the user mailbox. 
>> >  
>> >  The asp page gives out the following erro  message:
>> >  '------------------------------------------------------------
>> >  
>> >  #Collaboration Data Objects error '000004f7' 
>> >  
>> >  [Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]] 
>> >  
>> >  /Admin01/script/submit_admin01.asp, line 262 
>> >  
>> >  '------------------------------------------------------------
>> >  
>> >  But the user do excatly the same things that i do. He is succesfully 
>> >  authenticated by the system, his mailbox his found into the LDAP 
d> > irectory 
>> >  but it fails to login to his mailbox. The user is connecting to the 
A> SP 
>> >  page from his workstation machine where he is logged with his 
computer 
>> >  account details.
>> >  
>> >  On "BART" it is installed OUTLOOK 2000.
>> >  
>> >  So if you have any idea or suggestion, they are more thant welcome. 
If 
y> > ou 
>> >  wnat more details , please don't hesitate to ask. At some point my 
>> >  thinking might be wrong. I'm fairly new using this technology, so I 
m> > ight 
>> >  miss a step. Please help.
>> >  
>> >  Thank you.
>> >  
>> >  David

  Return to Index