<?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: CredentialCache System.Security error.</title><link>https://www.infopathdev.com:443/forums/thread/75639.aspx</link><pubDate>Thu, 23 Feb 2012 09:38:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75639</guid><dc:creator>Oliver D.</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75639.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=75639</wfw:commentRss><description>&lt;p&gt;@Scott Rooke&lt;/p&gt;&lt;p&gt;As I said somewhere in the bottom of my text setting the form security to full trust is not an option, becouse we are not allowed to do this.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;@Hilary Stoupa&lt;/p&gt;&lt;p&gt;Your solution works flawless. Thanks so much. Now we do not need to do some big and ugly workarounds, or even throw the idea away. And there was no need to set the Form security to something further than Domain access.&lt;/p&gt;&lt;p&gt;I was unaware of the fact that i can dynamicaly change the URL of a XML data connection. But thanks again for the hint.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So mark this thread as&lt;/p&gt;&lt;p&gt;SOLVED. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;(or is there a button to do this, which i did not see?) &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: CredentialCache System.Security error.</title><link>https://www.infopathdev.com:443/forums/thread/75552.aspx</link><pubDate>Tue, 21 Feb 2012 16:44:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75552</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75552.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=75552</wfw:commentRss><description>&lt;p&gt;Have you considered using an InfoPath data connection to your URL? You set it up as an XML file connection, leave out the filter fields, and then you can just add the filters in your code and execute the data connection. Using an IP data connection generally makes security easier. Here&amp;#39;s a code &lt;a href="http://www.bizsupportonline.net/blog/2009/07/pre-filter-large-sharepoint-list-infopath-wss-owssvr-dll/"&gt;sample&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.qdabra.com/en/products/download/qRulesTrial.aspx"&gt;qRules&lt;/a&gt; also does this, by the way. &lt;/p&gt;</description></item><item><title>Re: CredentialCache System.Security error.</title><link>https://www.infopathdev.com:443/forums/thread/75532.aspx</link><pubDate>Tue, 21 Feb 2012 11:55:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75532</guid><dc:creator>Scott Rooke</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75532.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=75532</wfw:commentRss><description>Hi Oliver &lt;br /&gt;&lt;br /&gt;I haven&amp;#39;t seen any mention of whether or not the form has &amp;quot;full trust&amp;quot; or not.  When  you publish the form you will need to set this setting.  I don&amp;#39;t recall where this setting is on InfoPath 2007 but found this from another post.  Give this path a try and let me know.  In the Designer, go to Tools-&amp;gt;Form Options-&amp;gt;Security. Deselect Automatic and select Full Trust. &lt;br /&gt;&lt;br /&gt;Scott</description></item><item><title>CredentialCache System.Security error.</title><link>https://www.infopathdev.com:443/forums/thread/75528.aspx</link><pubDate>Tue, 21 Feb 2012 10:08:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75528</guid><dc:creator>Oliver D.</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75528.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=75528</wfw:commentRss><description>&lt;p&gt;Hi there,&lt;/p&gt;&lt;p&gt;currently i am writing a little bit of code in Infopath to receive specific data from a SharePoint server. But first things first.&lt;/p&gt;&lt;p&gt;I am using InfoPath 2007 and Sharepoint 2007. Language C#&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can put this thread into various subforums such as Webservise, Code or Data Connections, but i think with Code i hit the best spot.&lt;/p&gt;&lt;p&gt;The situation is this:&lt;/p&gt;&lt;p&gt;I have one Sharepoint formlibrary where the forms will be uploaded and the task list with the tasks from various workflows working on the forms. What I am trying to do is to display the actual tasks of the form in the form itself. For this I wrote some code which will get the ID of the form out of the library. The code compares the ID with the WorkflowItemId in the tasklist and so the code gets the actual tasks for the form. After this the code writes the tasks into the form. Thats for the theory.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now whats not working?&lt;/p&gt;&lt;p&gt;I want to get the ID of the form over a webrequest with a REST url. In the Browser its working fine.&amp;nbsp; &lt;/p&gt;&lt;p&gt;The url looks like this:&lt;/p&gt;&lt;p&gt;URL = http://Sharepointadress/_vti_bin/owssvr.dll?Cmd=Display&amp;amp;List={LISTGUID}&amp;amp;XMLDATA=TRUE&amp;amp;FilterField1=Title&amp;amp;FilterValue1=FORMNAME&amp;amp;noredirect=true&amp;amp;Query=ID&lt;/p&gt;&lt;p&gt;With this i will get exactly one or zero IDs. Zero when the form does not exist.&lt;/p&gt;&lt;p&gt;When i am trying this with my webrequest in C# it works as long as i am trying this on my dev machine. When the form is published on the target Sharepoint and i open it on another machine in the same domain, i will get an error. I have located the line of code which is responsible for that, but i have not yet found a solution or a workarount. The line of code lies in the webrequest.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;HttpWebRequest req = (HttpWebRequest)WebRequest.Create(URL);&lt;/p&gt;&lt;p&gt;req.PreAuthenticate = true;&lt;/p&gt;&lt;p&gt;req.AuthenticationLevel = System.Net.Security.AuthenticationLevel.MutualAuthRequested; &lt;/p&gt;&lt;p&gt;req.Method = &amp;quot;GET&amp;quot;;&lt;/p&gt;&lt;p&gt;req.UserAgent = &amp;quot;MSIE 8.0&amp;quot;;&lt;/p&gt;&lt;p&gt;req.CookieContainer = new CookieContainer();&lt;/p&gt;&lt;p&gt;req.Credentials = CredentialCache.DefaultNetworkCredentials; //When i am commenting this line out i will get a 401 error, if its not commented out ill get a system.security.SecurityException&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;resp = (HttpWebResponse)req.GetResponse();&lt;/p&gt;&lt;p&gt;RespStream = resp.GetResponseStream();&lt;/p&gt;&lt;p&gt;StreamReader reader = new StreamReader(RespStream);&lt;/p&gt;&lt;p&gt;string xml = reader.ReadToEnd(); &lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;I think the form does not have the rights to send the user credentials to the sharepoint. But why? It is in the same Domain. Is there a solution for this Problem? I worked already for 3 days on this and I havn&amp;#39;t found a solution. Or is there anotherway to get the ID or the WorkflowItemId (works also with a webrequest, same error) without producing too much overhead in the dataconnection? For example modifying the location of the xml file from a xml dataconnection. Or something like that. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Setting the form to fulltrust is not an option!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Best regards&lt;/p&gt;&lt;p&gt;Oliver D. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;PS: Maybe the full error text would be helpful.&lt;/p&gt;&lt;p&gt;&lt;img src="http://imageshack.us/photo/my-images/824/errorxhu.png/" alt="" /&gt;&lt;a href="http://imageshack.us/photo/my-images/824/errorxhu.png/" target="_blank"&gt;&lt;span class="nodeLabelBox repTarget "&gt;&lt;span class="nodeAttr editGroup "&gt;&lt;span class="nodeValue editable "&gt;http://imageshack.us/photo/my-images/824/errorxhu.png/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>