My app (VB ASP.NET) sends emails with attachments. I'm getting an error though when I try and create the variable. This line: Dim SMTPMessage As New SMTPClient produces this error: property 'port'. (E:\web\timeclox\web.config line 176) at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) at System.Web.HttpContext.GetSection(String sectionName) at System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName) at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey) at System.Configuration.ConfigurationManager.GetSection(String sectionName) at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName) at System.Net.Configuration.SmtpSectionInternal.GetSection() at System.Net.Mail.SmtpClient.get_MailConfiguration() at System.Net.Mail.SmtpClient.Initialize() at System.Net.Mail.SmtpClient..ctor() at Time_Entry_System.Login.Page_Load(Object sender, EventArgs e) I think it has something to do with trust but I'm unsure. Does anyone have an idea?
This Knowledge Base article will show you how to modify your web.config to enable 'Full' trust: http://support.Winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx But what's the full error message?