Hello all,
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?
In any case, I'm getting an error whenever I try calling the following managed code in an infopath project.
"System.Security.Permissions.SecurityPermission"
<DllImport("wininet.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Private Shared Function InternetGetCookie(ByVal url As String, ByVal name As String, ByVal data As StringBuilder, ByRef dataSize As Integer) As Boolean
End Function
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?
I'm using visual studio 2005 for the managed code.
Thanks for your time -- it's greatly appreciated!