<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: SPSecurity.RunWithElevatedPrivileges error out</title><link>https://www.infopathdev.com:443/forums/thread/29528.aspx</link><pubDate>Thu, 19 Jun 2008 21:00:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29528</guid><dc:creator>iii1682000</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29528.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=29528</wfw:commentRss><description>&lt;p&gt;A even much simpler version of my question:&lt;/p&gt;
&lt;p&gt;Is that possible to access SPSite and SPWeb&amp;nbsp;object from InfoPath Code (FormCode.cs)? How?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: SPSecurity.RunWithElevatedPrivileges error out</title><link>https://www.infopathdev.com:443/forums/thread/29526.aspx</link><pubDate>Thu, 19 Jun 2008 20:41:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29526</guid><dc:creator>iii1682000</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29526.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=29526</wfw:commentRss><description>&lt;p&gt;Hey here is a hint of another version of my qestion about this error:&lt;/p&gt;
&lt;p&gt;I am pretty much sure it&amp;#39;s a security issue. I am &lt;br /&gt;runing InfoPath 2007. Question and hint: What user identity and &lt;br /&gt;application pool to run the InfoPath web form or service. How should I &lt;br /&gt;know that? &lt;/p&gt;
&lt;p&gt;I need to check the identity or impersonate an admin user to do this. &lt;/p&gt;
&lt;p&gt;How to do impersonation in InfoPath form. I added a block of code in the infopath.exe.config in my local development&amp;nbsp;machine and the web.config of the virtual directory of the stage machine, none of them works&lt;/p&gt;
&lt;p&gt;&amp;lt;system.web&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;identity impersonate=&amp;quot;true&amp;quot; userName=&amp;quot;OurDomain\OurAdminAccount&amp;quot; password=&amp;quot;xxxxxxxx&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;/system.web&amp;gt;&lt;/p&gt;
&lt;p&gt;Any idea?&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: SPSecurity.RunWithElevatedPrivileges error out</title><link>https://www.infopathdev.com:443/forums/thread/29525.aspx</link><pubDate>Thu, 19 Jun 2008 20:14:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29525</guid><dc:creator>iii1682000</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29525.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=29525</wfw:commentRss><description>&lt;p&gt;Any help or advice yet?&lt;/p&gt;</description></item><item><title>SPSecurity.RunWithElevatedPrivileges error out</title><link>https://www.infopathdev.com:443/forums/thread/29481.aspx</link><pubDate>Wed, 18 Jun 2008 18:44:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29481</guid><dc:creator>iii1682000</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29481.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=29481</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I am trying to assign roles to a document library item from InfoPath code and have issues with it&lt;/p&gt;If I call &lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;using&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;SPSite&lt;/font&gt;&lt;font size="2"&gt; site = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;SPSite&lt;/font&gt;&lt;font size="2"&gt;(&lt;a href="http://mysite_url/"&gt;http://mysite_url&lt;/a&gt;)) (where &lt;a href="http://mysite_url/"&gt;http://mysite_url&lt;/a&gt; is the site on the local machine I am coding)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;it complains the site doesn&amp;#39;t exsit (and it surely does)&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Then&amp;nbsp;I was trying to wrap everying (myfunction) into&amp;nbsp;&amp;nbsp;SPSecurity.RunWithElevatedPrivileges(), now I get an exception&amp;nbsp;&amp;quot;&lt;font size="1"&gt;Object reference not set to an instance of an object&amp;quot; on the line &lt;font size="2"&gt;SPSecurity.RunWithElevatedPrivileges(myfunction), &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;&lt;font size="2"&gt;This is so weird, does anybody know why?&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>