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******@discu ssions.microsof t.com> wrote in message
news:EF******** *************** ***********@mic rosoft.com...
| When attempting to load an Oulook Object in ASP.Net (VB) I get the
foloowing
| error on the Server:
|
| System.Security .SecurityExcept ion: Request for the permission of type
| System.Security .Permissions.Se curityPermissio n, mscorlib,
Version=1.0.500 0.0,
| Culture=neutral , PublicKeyToken= b77a5c561934e08 9 failed.
|
| Here's the code
| Dim objOutlook As New Outlook.Applica tion
| Dim objOutlookMsg As Outlook.MailIte m
| objOutlook = CreateObject("O utlook.Applicat ion")
| objOutlookMsg =
| objOutlook.Crea teItem(Outlook. OlItemType.olMa ilItem)
| With objOutlookMsg
| .Recipients.Add (RecipientEmail )
| .Subject = _MAIL_SUBJECT
| .HTMLBody = strStaticBody
| .Display()
| End With
| objOutlookMsg = Nothing
| objOutlook = Nothing
| I have a reference to the DLL