<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: System.Web.Mail throws error.</title><link>https://www.infopathdev.com:443/forums/thread/13637.aspx</link><pubDate>Sat, 24 Sep 2005 20:08:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13637</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13637.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13637</wfw:commentRss><description>Hi Craig,&lt;br /&gt;You have discovered a big issue with VS and InfoPath. Another scenario that doesn't work well is debugging full trust solutions from VS.NET. Anyway, InfoPath is working on improving this for Office 12 release next year. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: System.Web.Mail throws error.</title><link>https://www.infopathdev.com:443/forums/thread/13636.aspx</link><pubDate>Thu, 22 Sep 2005 22:18:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13636</guid><dc:creator>cafearizona</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13636.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13636</wfw:commentRss><description>Found the root of this issue.  The form has to be "published" and then opened from it's publihsed location for the system.web.mail library to work.  Of course in hindsight this makes sence...but it sure does make coding from the vs.net interface a lot slower.  &lt;br /&gt;&lt;br /&gt;In summary...the code I posted above will work...just publish and then open the form from the published location to avoid that ugly error.  Also....this works well for email alerts without using the outlook object on the client!&lt;br /&gt;&lt;br /&gt;Craig</description></item><item><title>System.Web.Mail throws error.</title><link>https://www.infopathdev.com:443/forums/thread/12574.aspx</link><pubDate>Wed, 21 Sep 2005 23:46:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12574</guid><dc:creator>cafearizona</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12574.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12574</wfw:commentRss><description>I'm getting this error if I try to use system.mail.web in code.  Does this mean my code is bad or that I can't use &lt;br /&gt;I added the system.web.dll as a reference and I put&lt;br /&gt;Imports System.Web.Mail at the top of the program....what am i missing?&lt;br /&gt;code:........................&lt;br /&gt;&lt;br /&gt;Dim mail As New MailMessage&lt;br /&gt;            mail.To = "cbaker@cafearizona.com"&lt;br /&gt;            mail.From = "jbaker@cafearizona.com"&lt;br /&gt;            mail.Subject = "this is a test email."&lt;br /&gt;            mail.Body = "this is my test email body"&lt;br /&gt;            'SmtpMail.SmtpServer = "localhost" 'your real server goes here&lt;br /&gt;            SmtpMail.Send(mail)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Error........................&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;System.Security.SecurityException&lt;br /&gt;Request for the permission of type System.Web.AspNetHostingPermission, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.&lt;br /&gt;   at InfoPathProject2.InfoPathProject2.CTRL1_5_OnClick(DocActionEvent e)&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)&lt;br /&gt;</description></item></channel></rss>