Hi,
I am using the foll code for sending mail using outlook objects and it gives me this error:
Private Sub SendMail()
Dim s As String
Dim objOutlook As Outlook._Application = New Outlook.ApplicationClass()
Dim objFolder As Outlook._NameSpace = objOutlook.GetNamespace("MAPI"

Dim objMail As Outlook._MailItem = objOutlook.CreateItem(OlItemType.olMailItem)
objMail.To = txtTo.SelectedItem.Value
objMail.From = txtFrom.SelectedItem.Value
objMail.Subject = txtSubject.Text
objMail.Body = txtMessage.Text
objMail.Send()
objOutlook.Quit()
End Sub
Error:
--------
Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access is denied.
The ASP.NET process is not authorized to access the requested resource. For security reasons the default ASP.NET process identity is '{machinename}\ASPNET', which has limited privileges. Consider granting access rights to the resource to the ASP.NET process identity.
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the "{machinename}\ASPNET" user. Highlight the ASP.NET account, and check the Write box in the Allow column.
I have done exactly the way it is mentd. above but doesn't help me.
Pls help.
Thanks,
ami.