Problem with session.login method, not authenticating 
Author Message
 Problem with session.login method, not authenticating

From within vb using outlook 2000   , the following code does not authentic

'Start Outlook.  If it is already running, you'll use the same instance.
    Dim olApp As Outlook.Application
    Dim olNs As Outlook.NameSpace
    Dim olFolder1 As MAPIFolder
    Dim obj As CdoObjectClass

    Set olApp = CreateObject("Outlook.Application")
     'Logon.  Doesn't hurt if you are already running and     logged on...
    Set olNs = olApp.GetNamespace("MAPI")                olNs.Logon "ISS
SMC", "password"
    'open ISS SMC Mailbox'
    Set fldMain = olNs.Folders("Mailbox - ISS SMC")

differnet way that does the same thing:

    Dim strEntryID As String
    Dim strStoreID As String
    Dim objSession As MAPI.Session
    Dim objCDOItem As MAPI.message

    ' get EntryID and StoreID for message
    strEntryID = objMsg.EntryID
    strStoreID = objMsg.Parent.StoreID

    ' start CDO session
    Set objSession = CreateObject("MAPI.Session")
    objSession.Logon "ISS SMC","password"

if I have Outlook open , it will work, if not it does not authentic, so I
cannot set the folder..

any help
Maarten



Sun, 07 Mar 2004 22:00:59 GMT  
 Problem with session.login method, not authenticating
Have you tried it without the password? I often use Logon without the
password argument in Outlook 2000 and CDO and it works here.

--
Ken Slovak
[MVP - Outlook]
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning Visual Basic 6 Application Development, Wrox
Press


Quote:
> From within vb using outlook 2000   , the following code does not
authentic

> 'Start Outlook.  If it is already running, you'll use the same
instance.
>     Dim olApp As Outlook.Application
>     Dim olNs As Outlook.NameSpace
>     Dim olFolder1 As MAPIFolder
>     Dim obj As CdoObjectClass

>     Set olApp = CreateObject("Outlook.Application")
>      'Logon.  Doesn't hurt if you are already running and     logged
on...
>     Set olNs = olApp.GetNamespace("MAPI")                olNs.Logon
"ISS
> SMC", "password"
>     'open ISS SMC Mailbox'
>     Set fldMain = olNs.Folders("Mailbox - ISS SMC")

> differnet way that does the same thing:

>     Dim strEntryID As String
>     Dim strStoreID As String
>     Dim objSession As MAPI.Session
>     Dim objCDOItem As MAPI.message

>     ' get EntryID and StoreID for message
>     strEntryID = objMsg.EntryID
>     strStoreID = objMsg.Parent.StoreID

>     ' start CDO session
>     Set objSession = CreateObject("MAPI.Session")
>     objSession.Logon "ISS SMC","password"

> if I have Outlook open , it will work, if not it does not authentic,
so I
> cannot set the folder..

> any help
> Maarten



Sun, 07 Mar 2004 22:25:19 GMT  
 Problem with session.login method, not authenticating
Yes, no go, I  need to authentic and the use stored password is disabled..
is there a way in code to enable this if this the problem.

Maarten



Quote:
> Have you tried it without the password? I often use Logon without the
> password argument in Outlook 2000 and CDO and it works here.

> --
> Ken Slovak
> [MVP - Outlook]
> Lead Author, Professional Outlook 2000 Programming, Wrox Press
> Lead Author, Beginning Visual Basic 6 Application Development, Wrox
> Press



> > From within vb using outlook 2000   , the following code does not
> authentic

> > 'Start Outlook.  If it is already running, you'll use the same
> instance.
> >     Dim olApp As Outlook.Application
> >     Dim olNs As Outlook.NameSpace
> >     Dim olFolder1 As MAPIFolder
> >     Dim obj As CdoObjectClass

> >     Set olApp = CreateObject("Outlook.Application")
> >      'Logon.  Doesn't hurt if you are already running and     logged
> on...
> >     Set olNs = olApp.GetNamespace("MAPI")                olNs.Logon
> "ISS
> > SMC", "password"
> >     'open ISS SMC Mailbox'
> >     Set fldMain = olNs.Folders("Mailbox - ISS SMC")

> > differnet way that does the same thing:

> >     Dim strEntryID As String
> >     Dim strStoreID As String
> >     Dim objSession As MAPI.Session
> >     Dim objCDOItem As MAPI.message

> >     ' get EntryID and StoreID for message
> >     strEntryID = objMsg.EntryID
> >     strStoreID = objMsg.Parent.StoreID

> >     ' start CDO session
> >     Set objSession = CreateObject("MAPI.Session")
> >     objSession.Logon "ISS SMC","password"

> > if I have Outlook open , it will work, if not it does not authentic,
> so I
> > cannot set the folder..

> > any help
> > Maarten



Sun, 07 Mar 2004 22:37:20 GMT  
 Problem with session.login method, not authenticating
As Sue mentioned in the other thread, if the profile property is set
for logon as None then a login dialog box would be needed. The profile
should be set to NT Password Authentication in the Mail applet in the
control panel or the Services properties to be able to avoid that.

--
Ken Slovak
[MVP - Outlook]
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning Visual Basic 6 Application Development, Wrox
Press


Quote:
> Yes, no go, I  need to authentic and the use stored password is
disabled..
> is there a way in code to enable this if this the problem.

> Maarten



Sun, 07 Mar 2004 23:09:49 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problems using Session.DeliverNow method

2. To session or not to session...

3. suggest method to maintain a list of users AND authenticate

4. ADODC Problem : Can not open database requested in Login

5. Return to Login Screen on Session Timeout

6. How to read Login, Password fron session data

7. Trouble with MAPI.Session Login Script

8. Website "login" authenticate against user's login/passwd to Windows machine.

9. Method or data member not found(Code Problem with rs.getVal1)

10. COM problem - Property or method not supported

11. Inet Controls Problem: 35753: Protocol not supported for this method

12. Inet Controls Problem: 35753: Protocol not supported for this method

 

 
Powered by phpBB® Forum Software