I am trying to send email in VB.Net using outlook 2013. I tested as localhost in debug mode and everything is fine. I can send and read Outlook emails in vb.net. However, when I publish the web application and click the send button I get the following exception:
System.Exception: Cannot create ActiveX component. at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName).
This code gives me the error.
Dim tempApp As Outlook.Application tempApp = CType(CreateObject("Outlook.Application"), Outlook.Application)
I have tried using.
Dim tempApp As New Outlook.Application
no luck this way either. I have done some searching for this problem and have tried the following solutions given to similar issues and still no fix: ASP.NET Cannot create ActiveX component Cannot create Active X Object
I will do my best to solve this issue and post up any findings I get.