| Author |
Message |
Fadi
Guest
|
Posted:
Sat Nov 19, 2005 9:58 am Post subject:
MAPI_E_NOT_INITIALIZED(80040605) on CDO1.21 Session Logon |
|
|
I am using CDO 1.21 library to get the number of new email messages in my
mailbox from exchange server 2003. The code i wrote is working fine when i
test it while logged in to the webserver. But if i try it from any client
machine, it is giving MAPI_E_NOT_INITIALIZED(80040605) error on the
session.Logon method. I think it might be a security error so i made myself
an administrator on the webserver (for testing purposes only), also i gave
the local intranet full trust on the webserver, but in vain.
I am using C#.NET as my development language
Source Code:
MAPI.Session oSession;
oSession = new MAPI.Session();
// Will use vEmpty for Empty parameter
Object vEmpty = Missing.Value;
oSession.Logon(vEmpty, vEmpty,vEmpty,vEmpty,vEmpty,vEmpty,"EXCH-SERVER\n" +
this.User.Identity.Name.Substring(this.User.Identity.Name.IndexOf("\\") + 1));
I have been stuck in this for 3 days now...
Any one knows what might be the problem?
Thanks in Advance,
Regards,
|
|
| Back to top |
|
 |
Lee Derbyshire [MVP]
Guest
|
Posted:
Sat Nov 19, 2005 4:14 pm Post subject:
Re: MAPI_E_NOT_INITIALIZED(80040605) on CDO1.21 Session Logo |
|
|
"Fadi" <Fadi@discussions.microsoft.com> wrote in message
news:37124B57-E89F-4C2A-AB64-A58CA90986CD@microsoft.com...
| Quote: | I am using CDO 1.21 library to get the number of new email messages in my
mailbox from exchange server 2003. The code i wrote is working fine when i
test it while logged in to the webserver. But if i try it from any client
machine, it is giving MAPI_E_NOT_INITIALIZED(80040605) error on the
session.Logon method. I think it might be a security error so i made
myself
an administrator on the webserver (for testing purposes only), also i gave
the local intranet full trust on the webserver, but in vain.
|
Every time that I've seen that, it usually meant that the logged-on user
didn't have sufficient permissions on the folder pointed to by the reg.
value:
HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem\ProfileDirectory
Lee.
--
___________________________________
Outlook Web Access for PDA and WAP:
www.leederbyshire.com
___________________________________ |
|
| Back to top |
|
 |
Fadi
Guest
|
Posted:
Sun Nov 20, 2005 9:58 am Post subject:
Re: MAPI_E_NOT_INITIALIZED(80040605) on CDO1.21 Session Logo |
|
|
That didn't work, Thanks anyways
I have searched the whole internet & i have not found anything helpful.
Didn't anybody try to do the same issue, i just want to get the number of
mails in the logged-in user's inbox. I didn't expect it would be so annoying
Regards,
"Lee Derbyshire [MVP]" wrote:
| Quote: | "Fadi" <Fadi@discussions.microsoft.com> wrote in message
news:37124B57-E89F-4C2A-AB64-A58CA90986CD@microsoft.com...
I am using CDO 1.21 library to get the number of new email messages in my
mailbox from exchange server 2003. The code i wrote is working fine when i
test it while logged in to the webserver. But if i try it from any client
machine, it is giving MAPI_E_NOT_INITIALIZED(80040605) error on the
session.Logon method. I think it might be a security error so i made
myself
an administrator on the webserver (for testing purposes only), also i gave
the local intranet full trust on the webserver, but in vain.
Every time that I've seen that, it usually meant that the logged-on user
didn't have sufficient permissions on the folder pointed to by the reg.
value:
HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem\ProfileDirectory
Lee.
--
___________________________________
Outlook Web Access for PDA and WAP:
www.leederbyshire.com
___________________________________
|
|
|
| Back to top |
|
 |
Lee Derbyshire [MVP]
Guest
|
Posted:
Sun Nov 20, 2005 4:10 pm Post subject:
Re: MAPI_E_NOT_INITIALIZED(80040605) on CDO1.21 Session Logo |
|
|
"Fadi" <Fadi@discussions.microsoft.com> wrote in message
news:8D627A36-126E-4E7D-BE72-EECAC4A2167B@microsoft.com...
| Quote: | That didn't work, Thanks anyways
I have searched the whole internet & i have not found anything helpful.
Didn't anybody try to do the same issue, i just want to get the number of
mails in the logged-in user's inbox. I didn't expect it would be so
annoying
|
Try getting a copy of the filemon utility, and see if it fails to create the
..mmp file when you run the app.
Lee.
--
___________________________________
Outlook Web Access for PDA and WAP:
www.leederbyshire.com
___________________________________ |
|
| Back to top |
|
 |
Dan Mitchell
Guest
|
Posted:
Thu Nov 24, 2005 12:58 am Post subject:
Re: MAPI_E_NOT_INITIALIZED(80040605) on CDO1.21 Session Logo |
|
|
"=?Utf-8?B?RmFkaQ==?=" <Fadi@discussions.microsoft.com> wrote in
news:37124B57-E89F-4C2A-AB64-A58CA90986CD@microsoft.com:
| Quote: | I am using CDO 1.21 library to get the number of new email messages in
my mailbox from exchange server 2003. The code i wrote is working fine
when i test it while logged in to the webserver. But if i try it from
any client machine, it is giving MAPI_E_NOT_INITIALIZED(80040605)
error on the session.Logon method. I think it might be a security
error so i made myself an administrator on the webserver (for testing
purposes only), also i gave the local intranet full trust on the
webserver, but in vain.
I am using C#.NET as my development language
|
First thing: using CDO1.21 in a .Net language isn't supported, and may
hit mysterious problems exactly like the one you're seeing. See
http://support.microsoft.com/kb/813349
http://support.microsoft.com/kb/872895
However, if you want to run your code on a web server, you can't use
the OOM either. Your best bet may be to use WebDAV or something.
That said, I think you're on the right track generally as far as
authentication goes -- try http://www.cdolive.com/asp.htm, that talks
about ASP rather than C#.Net, but the same sorts of problems will apply
if it's the web server running your code.
-- dan |
|
| Back to top |
|
 |
Guest
|
Posted:
Tue Nov 29, 2005 1:21 am Post subject:
Re: MAPI_E_NOT_INITIALIZED(80040605) on CDO1.21 Session Logo |
|
|
I have also been trying to write a C# app that will give me the number
of message in a mailbox, but I need the number of messages in a mailbox
other than the currently logged on user. We all share a helpdesk
mailbox and I have to write some kind of app that will check the
mailbox and see if there are unread messages periodically. Here is the
big question: HOW do I do this?
Jacob |
|
| Back to top |
|
 |
|
|
|
|