<?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>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: writing a file to SharePoint on button click?</title><link>https://www.infopathdev.com:443/forums/thread/39858.aspx</link><pubDate>Mon, 23 Mar 2009 16:12:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39858</guid><dc:creator>CraigW</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39858.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=39858</wfw:commentRss><description>&lt;p&gt;Okay, I have now set Trust=Full in web.config, added my assembly to the SafeControls list in web.config AND added my assembly to the GAC and I STILL get&amp;nbsp;a SharePoint CAS error!!!!!!&lt;/p&gt;
&lt;p&gt;Here is the error&amp;nbsp;from forms services:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;=====================&lt;/p&gt;
&lt;p&gt;Request failed. &lt;br /&gt;&lt;br /&gt;System.Security.SecurityException: Request failed. &lt;br /&gt;at Microsoft.SharePoint.SPSite.Dispose() &lt;br /&gt;at Purchase_Requisition.FormCode.PublishExport(String fileContent, String fileName, String exportListUrl) &lt;br /&gt;at Purchase_Requisition.FormCode.btnApproveRequisition_Clicked(Object sender, ClickedEventArgs e) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonEventHost.&amp;lt;&amp;gt;c__DisplayClass6.&amp;lt;&amp;gt;c__DisplayClass8.&amp;lt;add_Clicked&amp;gt;b__1() &lt;br /&gt;at Microsoft.Office.InfoPath.Server.Util.DocumentReliability.InvokeBusinessLogic(Thunk thunk) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonEventHost.&amp;lt;&amp;gt;c__DisplayClass6.&amp;lt;add_Clicked&amp;gt;b__0(Object sender, ClickedEventArgs e) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonEventHost.FireClickedEvent(Object sender, ClickedEventArgs args) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonFormCode.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;&amp;gt;c__DisplayClass5.&amp;lt;Click&amp;gt;b__1() &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.CallFormCodeWithExceptionHandling(UserMessages userMessages, OMCall d) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonFormCode.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;Click&amp;gt;b__0() &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonFormCode.Click(Document document, XPathNavigator container) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventClick.Play(Document document, BindingServices bindingServices, EventLogProcessor eventLogProcessor) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.Event.PlayEvent(Document document, BindingServices bindingServices, EventLogProcessor eventLogProcessor) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventLogProcessor.&amp;lt;&amp;gt;c__DisplayClass1.&amp;lt;ExecuteLog&amp;gt;b__0() &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventLogProcessor.ExecuteLog(Int32 expectedEventLogID) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.&amp;lt;&amp;gt;c__DisplayClass6.&amp;lt;PlayEventLog&amp;gt;b__3() &lt;br /&gt;at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) &lt;br /&gt;The action that failed was: &lt;br /&gt;Demand &lt;br /&gt;The type of the first permission that failed was: &lt;br /&gt;Microsoft.SharePoint.Security.SharePointPermission &lt;br /&gt;The first permission that failed was: &lt;br /&gt;&amp;lt;IPermission class=&amp;quot;Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot; &lt;br /&gt;ObjectModel=&amp;quot;True&amp;quot;/&amp;gt; &lt;br /&gt;&lt;br /&gt;The demand was for: &lt;br /&gt;&amp;lt;PermissionSet class=&amp;quot;System.Security.PermissionSet&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot;&amp;gt; &lt;br /&gt;&amp;lt;IPermission class=&amp;quot;Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot; &lt;br /&gt;ObjectModel=&amp;quot;True&amp;quot;/&amp;gt; &lt;br /&gt;&amp;lt;/PermissionSet&amp;gt; &lt;br /&gt;&lt;br /&gt;The only permitted permissions were: &lt;br /&gt;&amp;lt;PermissionSet class=&amp;quot;System.Security.PermissionSet&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot;&amp;gt; &lt;br /&gt;&amp;lt;IPermission class=&amp;quot;System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot; &lt;br /&gt;Read=&amp;quot;USERNAME&amp;quot;/&amp;gt; &lt;br /&gt;&amp;lt;IPermission class=&amp;quot;System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot; &lt;br /&gt;Flags=&amp;quot;Execution&amp;quot;/&amp;gt; &lt;br /&gt;&amp;lt;IPermission class=&amp;quot;System.Security.Permissions.UrlIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot; &lt;br /&gt;Url=&amp;quot;file:///C:/Inetpub/wwwroot/wss/VirtualDirectories/80/&amp;quot;/&amp;gt; &lt;br /&gt;&amp;lt;IPermission class=&amp;quot;System.Security.Permissions.ZoneIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot; &lt;br /&gt;Zone=&amp;quot;MyComputer&amp;quot;/&amp;gt; &lt;br /&gt;&amp;lt;IPermission class=&amp;quot;System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot; &lt;br /&gt;Level=&amp;quot;Minimal&amp;quot;/&amp;gt; &lt;br /&gt;&amp;lt;IPermission class=&amp;quot;System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot; &lt;br /&gt;Unrestricted=&amp;quot;true&amp;quot;/&amp;gt; &lt;br /&gt;&amp;lt;IPermission class=&amp;quot;System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; &lt;br /&gt;version=&amp;quot;1&amp;quot; &lt;br /&gt;Unrestricted=&amp;quot;true&amp;quot;/&amp;gt; &lt;br /&gt;&amp;lt;/PermissionSet&amp;gt; &lt;br /&gt;&lt;br /&gt;The method that caused the failure was: &lt;br /&gt;Void &amp;lt;add_Clicked&amp;gt;b__0(System.Object, Microsoft.Office.InfoPath.ClickedEventArgs)&lt;/p&gt;
&lt;p&gt;========================&lt;/p&gt;
&lt;p&gt;Any ideas??&lt;/p&gt;
&lt;p&gt;Craig&lt;/p&gt;</description></item><item><title>writing a file to SharePoint on button click?</title><link>https://www.infopathdev.com:443/forums/thread/39853.aspx</link><pubDate>Mon, 23 Mar 2009 15:04:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39853</guid><dc:creator>CraigW</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39853.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=39853</wfw:commentRss><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I have a forms-services rendered form and I would like to create&amp;nbsp;file based on some of the contents when a button is clicked.&lt;/p&gt;
&lt;p&gt;I have managed to generate the file contents fine, but I CANNOT get it to write to anywhere!&lt;/p&gt;
&lt;p&gt;My first thought was to write the file back to another SharePoint document library, which I thought would be dead easy, but I can&amp;#39;t get past SharePoint CAS, even when my InfoPath project dll is deployed to the GAC!!&amp;nbsp; Has anyone ever managed to get that working?&amp;nbsp; I&amp;#39;ve tried a custom policy but that didn&amp;#39;t work either.&lt;/p&gt;
&lt;p&gt;As an alternative, I just tried using HttpContext.Current to send the file to the user, but that just returns a completely un-useful &amp;#39;Critical Error&amp;#39; in forms services, with no other information.&lt;/p&gt;
&lt;p&gt;So, how does everyone else do this?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Craig&lt;/p&gt;</description></item></channel></rss>