<?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: Security Exception Error</title><link>https://www.infopathdev.com:443/forums/thread/26829.aspx</link><pubDate>Thu, 28 Feb 2008 00:59:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26829</guid><dc:creator>wildguixe</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26829.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26829</wfw:commentRss><description>&lt;p&gt;try with the framework configuration on the control panel ;) put Full Trust ....&lt;/p&gt;</description></item><item><title>Re: Security Exception Error</title><link>https://www.infopathdev.com:443/forums/thread/26788.aspx</link><pubDate>Tue, 26 Feb 2008 23:08:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26788</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26788.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26788</wfw:commentRss><description>&lt;p&gt;That it is giving you a security error is what doesn&amp;#39;t make sense.&lt;/p&gt;
&lt;p&gt;Please also check that the object you are trying to get .Count on is valid and not null. This shouldn&amp;#39;t give you a security error... but I&amp;#39;m at a loss for what could be going on. Doesn&amp;#39;t appear that there would be any timing issues or anything.&lt;/p&gt;</description></item><item><title>Re: Security Exception Error</title><link>https://www.infopathdev.com:443/forums/thread/26752.aspx</link><pubDate>Tue, 26 Feb 2008 09:51:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26752</guid><dc:creator>Catharine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26752.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26752</wfw:commentRss><description>&lt;p&gt;Hi,&amp;nbsp; I have fallen foul of that before.....&lt;/p&gt;
&lt;p&gt;But I have double checked - in this case it is in a Changed event.&amp;nbsp;&amp;nbsp; When run stepwise in debug,&amp;nbsp; I get the error message, then when repeating the line of code it works ?&amp;nbsp; Very odd.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Why would I need any extra permissions for accesssing data from my main data source which is within the form ?&lt;/p&gt;
&lt;p&gt;Catharine&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Security Exception Error</title><link>https://www.infopathdev.com:443/forums/thread/26727.aspx</link><pubDate>Tue, 26 Feb 2008 00:59:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26727</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26727.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26727</wfw:commentRss><description>&lt;p&gt;In the Changing event handler, the DOM is readonly.&lt;/p&gt;
&lt;p&gt;In the Changed event handler, be sure to examine the e.Operation property to only process your code during the right operation (i.e. Delete, Insert, Value Change, etc)&lt;/p&gt;</description></item><item><title>Security Exception Error</title><link>https://www.infopathdev.com:443/forums/thread/26644.aspx</link><pubDate>Thu, 21 Feb 2008 11:45:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26644</guid><dc:creator>Catharine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26644.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26644</wfw:commentRss><description>&lt;p&gt;Hi - I am using Infopath 2007 and VB.&lt;/p&gt;
&lt;p&gt;I have a form with several bits of code behind the Changed/Changing events.&amp;nbsp; The form&amp;#39;s permissions are&amp;nbsp;set to automatically determine level required.&lt;/p&gt;
&lt;p&gt;I have started getting errors when running code.....&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; grp &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt; = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:ApplicationGroup/my:ApplicationContactsGroup/my:InvistaITContactGroup&amp;quot;&lt;br /&gt;&lt;/font&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; concat &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt; = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; itgroup &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; XPathNodeIterator&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; navout &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; XPathNavigator&lt;br /&gt;itgroup = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;font size="2"&gt;.CreateNavigator.Select(grp, NamespaceManager)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; norecs &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Integer&lt;/font&gt;&lt;font size="2"&gt; = itgroup.Count &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;lt;-------- at this point I get the error &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;System.Security.SecurityException was unhandled by user code&lt;br /&gt;&amp;nbsp; Message=&amp;quot;Request failed.&amp;quot;&lt;br /&gt;&amp;nbsp; Source=&amp;quot;Microsoft.Office.InfoPath.Client.Internal.Host&amp;quot;&lt;br /&gt;&amp;nbsp; StackTrace:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.MsxmlNavigator.IsValidNode(MsxmlNode test)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.MsxmlNavigator.MoveToFirstChild()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.Xml.XPath.XPathChildIterator.MoveNext()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.Xml.XPath.ChildrenQuery.Advance()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.Xml.XPath.ChildrenQuery.Advance()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.Xml.XPath.ChildrenQuery.Advance()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.Xml.XPath.Query.MoveNext()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.Xml.XPath.Query.get_Count()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MS.Internal.Xml.XPath.XPathSelectionIterator.get_Count()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at ApplicationIndex10.FormCode.Concatenate_Multiple_owner_fields(String grp, String fld1, String fld2, String fld3, String fld4, String punc, String concatfield)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at ApplicationIndex10.FormCode.InvistaITContactGroup_Changed(Object sender, XmlEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.Internal.XmlEventHost.GenericProxy(Object genericDelegate, DataDOMEvent dataDOMEvent, InfoPathEvents type)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.Internal.XmlEventHost.ChangedProxy(DataDOMEvent dataDOMEvent)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_SinkHelper.OnAfterChange(DataDOMEvent pDataDOMEvent)&lt;/font&gt;&lt;br /&gt;&lt;font color="#800000" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#800000"&gt;When I am running in debug mode and have had the exception&amp;nbsp;I go into &amp;#39;enable edit&amp;#39;, and re-run exactly the same lines of code and it works ........ so can&amp;#39;t get to the bottom of the problem.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#800000" size="2"&gt;I don&amp;#39;t understand why accessing a group in my main data source would give this error -&amp;nbsp; and why it doesn&amp;#39;t run in debug - but once it has had the error and I run the same lines again it works - can anyone explain where I have gone wrong.....&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#800000"&gt;This is happening in several places in the code.&amp;nbsp; The consistent thing is that it is always on a .count of a navigator where the problem occurs.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#800000" size="2"&gt;Thank you.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#800000" size="2"&gt;Catharine&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item></channel></rss>