Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP CDO
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 4th, 2004, 10:03 AM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CDO and ASP works on webserver but not on clients

Hi,

I have written a helpdesk application that sends emails to users when activity occurs on their helpdesk cases. The email module uses the CDO MAPI objects to log onto the HelpDesk mail box and send an email to the appropriate user.

The website is running on my own machine at the moment which is running Windows XP. My test server is suffering the same problem running IIS5 and windows 2000 server.

Essentially the code works perfectly when logged onto the local machine. No errors are presented and the emails are sent. However if I log into the application from a remote machine the code fails showing the error "MAPI_E_LOGON_FAILED"

I have created a test page with the following code :
on error resume next

Set objSession = Server.CreateObject("MAPI.Session")
response.write "Create Session - Error no: " & err.number & "<BR>" & "Description : " & err.description & "<BR>"
err.clear


objSession.Logon "", "", False, True, 0, True, "Saturn" & vbLF & "Help Desk"
response.write "Logon - Error no: " & err.number & "<BR>" & "Description : " & err.description & "<BR>"
err.clear

response.write "Current User - " & objSession.CurrentUser & "<BR>"
response.write "ASP Current User - " & Request.ServerVariables("LOGON_USER") & "<BR>"
err.clear

Set objMessage = objSession.Outbox.Messages.Add
response.write "Add Message - Error no: " & err.number & "<BR>" & "Description : " & err.description & "<BR>"
err.clear


The results of which, when run from a remote machine are as follows :

Create Session - Error no: 0
Description :
Logon - Error no: 0
Description :
Current User - Unknown
ASP Current User - <domain>\MatthewB
Add Message - Error no: -2147221231
Description : The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]

Anyone any ideas as I am completely stumped.

Thanks

Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP CDO MAIL cullancrothers Classic ASP Professional 2 February 24th, 2006 06:16 PM
Sending message to multiple clients through asp.ne madhavan General .NET 0 January 27th, 2006 07:36 AM
Works in QA but not on ASP page rstelma SQL Server 2000 1 October 10th, 2003 03:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.