<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Accessing Full trust published InfoPath forms from host windows application</title><link>https://www.infopathdev.com:443/forums/thread/29962.aspx</link><pubDate>Tue, 01 Jul 2008 13:46:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29962</guid><dc:creator>Anjali</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29962.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29962</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;In my project, I need to embed some InfoPath data-entry fomrs into a windows application. As per the current architecture of the application, the data entry forms need to be developed using InfoPath and published onto a netwrok shared folder. These InfoPath forms, internally talk to the SQL database through our data access layer - refered as DLL in each InfoPath form. The host windows application will be installed on each clients machine and appropriate InfoPath forms will be made available to the users based on their rules.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;All done, I am running into a deployment issue at this stage. I created an InfoPath form and published onto a netwrok drive. I need to enable Full trust and sign it with the current user&amp;#39;s certificate to enable access to the clients. The problem that I am currently facing is that although the published InfoPath form opens properly into the InfoPath client application (with a Security Notice pop-up) the same form cannot be opened through the FormControl control of .NET. &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#1f497d;FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#1f497d;FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;The host application (windows application) throws an exception saying: Hosted InfoPath cannot create a new, blank form. Hosted InfoPath cannot load this form. The signature on this form is not from trusted publisher. Following is the code that I am using to programmatically open the published xsn:&lt;/span&gt;&lt;/p&gt;&lt;span style="FONT-SIZE:11pt;COLOR:#1f497d;FONT-FAMILY:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;try&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (!&lt;/font&gt;&lt;font color="#008080" size="2"&gt;File&lt;/font&gt;&lt;font size="2"&gt;.Exists(filePath))&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;{ ... &lt;/font&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;strong&gt;InfoPathControl.NewFromFormTemplate(filePath);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;catch&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#008080" size="2"&gt;Exception&lt;/font&gt;&lt;font size="2"&gt; ex) {&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font size="2"&gt;... }&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;where InfoPathControl is an object of Microsoft.Office.InfoPath.FormControl&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Can anyone please help me with surpassing this security issue? How do we successfully open the published InfoPath forms onto a client application in such a scenario??&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Thanks in advance,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Anjali&lt;/p&gt;&lt;/font&gt;&lt;/span&gt;</description></item></channel></rss>