<?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: InternetGetCookie managed Code error</title><link>https://www.infopathdev.com:443/forums/thread/14373.aspx</link><pubDate>Wed, 08 Mar 2006 23:04:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14373</guid><dc:creator>skully</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14373.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14373</wfw:commentRss><description>Hi Patrick (and others),&lt;br /&gt;&lt;br /&gt;I got it to work -- finally. It turns out that the managed code segment DOES run correctly when I publish as a fully-trusted form that's installed via an MSI. I guess it just wasn't allowed to run when VisualStudio 2005 was debugging or previewing the form's code, even when I had the form set to "Full trust." &lt;br /&gt;&lt;br /&gt;In any case, I've now got a solid routine to use IE cookies within a form's managed code during web service calls.&lt;br /&gt;&lt;br /&gt;Thanks for your help!</description></item><item><title>Re: InternetGetCookie managed Code error</title><link>https://www.infopathdev.com:443/forums/thread/14372.aspx</link><pubDate>Wed, 08 Mar 2006 15:33:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14372</guid><dc:creator>skully</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14372.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14372</wfw:commentRss><description>Hi Patrick,&lt;br /&gt;&lt;br /&gt;Thanks for the quick reply.&lt;br /&gt;&lt;br /&gt;Yep, it's already under full trust, so I'll have to re-read chapter 8 (I'm a big fan of your book -- definitely one of the best out there, especially for Web services freaks like me).&lt;br /&gt;OK. I'll keep you posted if this approach works. Basically, I MUST use cookies for this project, so piggy-backing on IE's own collection would be really helpful. &lt;br /&gt;&lt;br /&gt;Take care.</description></item><item><title>Re: InternetGetCookie managed Code error</title><link>https://www.infopathdev.com:443/forums/thread/14371.aspx</link><pubDate>Wed, 08 Mar 2006 08:32:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14371</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14371.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14371</wfw:commentRss><description>Hi Skully,&lt;br /&gt;Go to Tools-&amp;gt;Form Options-&amp;gt;Security and set your form to be fully trusted and then try. If that doesn't work, check out chapter 8 of our book. Cheers!</description></item><item><title>InternetGetCookie managed Code error</title><link>https://www.infopathdev.com:443/forums/thread/12807.aspx</link><pubDate>Wed, 08 Mar 2006 04:35:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12807</guid><dc:creator>skully</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12807.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12807</wfw:commentRss><description>Hello all,&lt;br /&gt;&lt;br /&gt;I've been trying to create a way to piggyback off of IE's cookie collection within Infopath managed code projects. I have several web service calls in the infopath form's code that require an authentication cookie. Rather than hard-coding the cookie or creating a winform to grab a username/password pair and creating a webrequest, I thought I'd let the infopath form use IE's cookie collection. Should be easy, right? &lt;br /&gt;&lt;br /&gt;In any case, I'm getting an error whenever I try calling the following managed code in an infopath project.&lt;br /&gt;&lt;br /&gt;"System.Security.Permissions.SecurityPermission"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;DllImport("wininet.dll", CharSet:=CharSet.Auto, SetLastError:=True)&amp;gt; _&lt;br /&gt;Private Shared Function InternetGetCookie(ByVal url As String, ByVal name As String, ByVal data As StringBuilder, ByRef dataSize As Integer) As Boolean&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;This snippit of code works in other managed code projects(winforms), but not in an infopath project. Is there a work-around or is this insurmountable? &lt;br /&gt;&lt;br /&gt;I'm using visual studio 2005 for the managed code.&lt;br /&gt;&lt;br /&gt;Thanks for your time -- it's greatly appreciated!&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>