Permission denied

Permission denied

Post by dGtzYXJ1b » Sat, 12 Mar 2005 15:15:02

Hope I will get correct solution from this group

I have created a dll to read the mails from inbox folder and to send the
mail-using outlook.

This is my dll code

Public Function sendMail()
Dim objOutlook As New Outlook.Application
Set objOutlook = CreateObject("Outlook.Application")

Dim objNamespace As Outlook.NameSpace
Set objNamespace = objOutlook.GetNamespace("MAPI")

Dim objInbox As Outlook.mapiFolder
'Set objInbox = CreateObject("Outlook.MAPIFolder")
Set objInbox = objNamespace.GetDefaultFolder(olFolderInbox)
Dim objItems As Outlook.Items
Set objItems = objInbox.Items

Dim oMsg As Outlook.MailItem

Dim i As Integer
For i = 1 To 5
'Set oMsg = objItems.Item(i)
'MsgBox ("Message number: " & i)
'MsgBox ("From : " & oMsg.Subject)
'MsgBox ("To : " & oMsg.Recipients)
Next i
'objInbox = objNamespace.GetDefaultFolder

Set MailItem = objOutlook.CreateItem(0)
With MailItem
.Subject = "Test mail from VB"
End With
End Function

My ASP code like
set mailTestDll = server.CreateObject("Project1.class1")
If I access this code from localhost (http://localhost/inboxread.asp), mails
are sending successfully. But if I access this page from another machine
(http://pcnumber/inboxread.asp) I am getting the following error

Error Type:
Project1 (0x800A0046)
Permission denied
inboxread/inboxTest.asp, line 3

Please advise me


Permission denied

Post by Jason Brow » Sat, 12 Mar 2005 15:22:55

I think it'll be down to the user context you're running in.

Locally, you could be authenticated as your login account, whereas remotely
I think you'll be authenticated as a guest account. try enabling integrated
(windows) authentication on the remote server.

Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no rights.


Permission denied

Post by dGtzYXJ1b » Fri, 18 Mar 2005 15:31:04


I will try in this way.