<?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.Security.Exception</title><link>https://www.infopathdev.com:443/forums/thread/27485.aspx</link><pubDate>Thu, 27 Mar 2008 15:21:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:27485</guid><dc:creator>wenni057</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/27485.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=27485</wfw:commentRss><description>&lt;p&gt;Whel I have found the solution.&lt;/p&gt;
&lt;p&gt;In InfoPath 2007 You can set on Tools/Form Options the security.&lt;/p&gt;
&lt;p&gt;When this is set to fully trusted and you also have created a sertificate, it is all working.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: System.Security.Exception</title><link>https://www.infopathdev.com:443/forums/thread/27484.aspx</link><pubDate>Thu, 27 Mar 2008 15:15:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:27484</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/27484.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=27484</wfw:commentRss><description>&lt;p&gt;Have you tried setting up the web service in data connections rather than doing it all in code?&lt;/p&gt;
&lt;p&gt;You have verified that you are getting domain and username correctly before it attempts to send it?&lt;/p&gt;</description></item><item><title>Re: System.Security.Exception</title><link>https://www.infopathdev.com:443/forums/thread/27480.aspx</link><pubDate>Thu, 27 Mar 2008 14:39:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:27480</guid><dc:creator>wenni057</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/27480.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=27480</wfw:commentRss><description>&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;I have tried this&lt;/font&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;new EnvironmentPermission(PermissionState.Unrestricted).Assert();&lt;br /&gt;RequestStatusNode.SetValue(System.Environment.GetEnvironmentVariable(&amp;quot;%userdomain%&amp;quot;));&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;but it still does not work out. The user will start the infopath document when he is logon in the domain. The AX webservice requires this information to grant access.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;fields to be set on the XML document&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Message ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GUIDID //is working fine&lt;br /&gt;Source Endpoint User:&amp;nbsp;&amp;nbsp;&amp;nbsp; Domain\Username //security trouble&lt;br /&gt;Source Endpoint:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; need for getting the information out of AX&amp;nbsp; //will be hard coded&lt;br /&gt;Destination Endpoint:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; need for getting the information out of AX //will be hard coded&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;any suggestions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: System.Security.Exception</title><link>https://www.infopathdev.com:443/forums/thread/27458.aspx</link><pubDate>Wed, 26 Mar 2008 19:17:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:27458</guid><dc:creator>wenni057</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/27458.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=27458</wfw:commentRss><description>&lt;p&gt;Hi I have a c# solution on my weblog&lt;/p&gt;
&lt;p&gt;&lt;a href="http://axstart.spaces.live.com/blog/cns!E82F2C8CB173C0A0!242.entry"&gt;http://axstart.spaces.live.com/blog/cns!E82F2C8CB173C0A0!242.entry&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Infact I want to generate the header with C# also in infoPath. In my demo situation sharepoint is on the same domain like Dynamics AX.&lt;br /&gt;these 2 lines make it work for c#&lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;&amp;nbsp; axCustTableService.Credentials = System.Net.CredentialCache.DefaultCredentials; // Use the current user to authenticate &lt;br /&gt;&lt;span style="FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;font color="#000000"&gt;&lt;font size="1"&gt;AxDocumentContext.SourceEndpointUser&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;= Environment.ExpandEnvironmentVariables(&amp;quot;%userdomain%\\%username%&amp;quot;);&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: System.Security.Exception</title><link>https://www.infopathdev.com:443/forums/thread/27452.aspx</link><pubDate>Wed, 26 Mar 2008 17:27:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:27452</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/27452.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=27452</wfw:commentRss><description>&lt;p&gt;Welcome to the forum.&lt;/p&gt;
&lt;p&gt;If the webservice is on a different server / site then SharePoint you would need cross domain allowed turned on in Central Admin with SP also you need the server in your Intranet security zone in IE.&lt;/p&gt;
&lt;p&gt;Often it is an IE issue since it is what is used for security.&lt;/p&gt;
&lt;p&gt;I would really like to see how you are integrating with Dynamics. I am working with someone and Great Plains right now but if you had a chance I would love to discuss what you are doing and share some notes maybe.&lt;/p&gt;
&lt;p&gt;Send me an email if you are interested.&lt;/p&gt;</description></item><item><title>System.Security.Exception</title><link>https://www.infopathdev.com:443/forums/thread/27449.aspx</link><pubDate>Wed, 26 Mar 2008 16:20:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:27449</guid><dc:creator>wenni057</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/27449.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=27449</wfw:commentRss><description>&lt;p&gt;I have a infopth document that uses Microsoft Dynamics AX webservices. (WSS 3.0 , Office InfoPatch 2007)&lt;/p&gt;
&lt;p&gt;on the load event of the infopath I would like to get some information:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; public void FormEvents_Loading(object sender, LoadingEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XPathNavigator root = this.MainDataSource.CreateNavigator();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RequestStatusNode = root.SelectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/tns:createSalesOrder/tns:DocumentContext/tns:SourceEndpointUser&amp;quot;, this.NamespaceManager);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RequestStatusNode.SetValue(System.Environment.ExpandEnvironmentVariables(&amp;quot;%userdomain%\\%username%&amp;quot;));&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;The page will be placed in a sharepoint site so domain autentication is active:&lt;/p&gt;
&lt;p&gt;Now I get this error. According to MS, I have to create a trusted site, but I don&amp;#39;t know&amp;nbsp;how. Or is there a more easy way to get the&amp;nbsp;Domain and user info.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;System.Security.SecurityException&lt;br /&gt;Request for the permission of type &amp;#39;System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;#39; failed.&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark&amp;amp; stackMark, Boolean isPermSet)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.Security.CodeAccessPermission.Demand()&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.Environment.ExpandEnvironmentVariables(String name)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Sales_Order_Entry_Form.FormCode.FormEvents_Loading(Object sender, LoadingEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.InfoPath.Internal.FormEventsHost.OnLoad(DocReturnEvent pEvent)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnLoad(DocReturnEvent pEvent)&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>