sakieboy,
Outlook is not designed to be run from an ASP.NET app!
| .Display()
Will attempt to display the outlook form on the server itself. If you are
attempting to display the user's Outlook client, then I would recommend
rethinking what you are doing as that is extremely virus like!
To simply send an email on the server I would recommend:
System.Web.Mail (.NET 1.x) :
http://msdn.microsoft.com/library/de...temwebmail.asp http://www.systemwebmail.com/
or System.Net.Mail (.NET 2.0) instead:
http://msdn2.microsoft.com/en-us/lib....net.mail.aspx
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"sakieboy" <sa******@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
| When attempting to load an Oulook Object in ASP.Net (VB) I get the
foloowing
| error on the Server:
|
| System.Security.SecurityException: Request for the permission of type
| System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0,
| Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
|
| Here's the code
| Dim objOutlook As New Outlook.Application
| Dim objOutlookMsg As Outlook.MailItem
| objOutlook = CreateObject("Outlook.Application")
| objOutlookMsg =
| objOutlook.CreateItem(Outlook.OlItemType.olMailIte m)
| With objOutlookMsg
| .Recipients.Add(RecipientEmail)
| .Subject = _MAIL_SUBJECT
| .HTMLBody = strStaticBody
| .Display()
| End With
| objOutlookMsg = Nothing
| objOutlook = Nothing
| I have a reference to the DLL