<?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: How do you trace exception info in browser forms with managed code?</title><link>https://www.infopathdev.com:443/forums/thread/50110.aspx</link><pubDate>Tue, 22 Dec 2009 10:03:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50110</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50110.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=50110</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;debugging InfoPath forms that are opened in the browser requires the following steps:&lt;/p&gt;
&lt;p&gt;1) Ensure the InfoPath Form Template is compiled in the Debug Configuration so the XSN includes the symbol (PDB) file&lt;br /&gt;2) Open the local copy of the code file in Visual Studio and set a breakpoint&lt;br /&gt;3) Attach to the appropriate &lt;strong&gt;w3wp&lt;/strong&gt; process&lt;br /&gt;4) Execute the process that will cause the breakpoint to be hit&lt;/p&gt;
&lt;p&gt;You can find detailed information here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/infopath/archive/2006/11/24/debugging-browser-forms.aspx"&gt;http://blogs.msdn.com/infopath/archive/2006/11/24/debugging-browser-forms.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;</description></item><item><title>Re: How do you trace exception info in browser forms with managed code?</title><link>https://www.infopathdev.com:443/forums/thread/50103.aspx</link><pubDate>Mon, 21 Dec 2009 22:45:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50103</guid><dc:creator>ACrush</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50103.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=50103</wfw:commentRss><description>Nice output. Thanks, I&amp;#39;ll take a look at log4net for tracing.
 
As for live debugging: Can someone hint at how to force catching Forms Services Exceptions in Visual Studio Debugger?</description></item><item><title>Re: How do you trace exception info in browser forms with managed code?</title><link>https://www.infopathdev.com:443/forums/thread/50100.aspx</link><pubDate>Mon, 21 Dec 2009 22:20:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50100</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50100.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=50100</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I´m not sure if this is what you are looking for ...&lt;/p&gt;
&lt;p&gt;For logging and tracing purpose I always use the (free) product &amp;quot;log4Net&amp;quot; (&lt;a title="http://logging.apache.org/log4net/index.html" href="http://logging.apache.org/log4net/index.html"&gt;http://logging.apache.org/log4net/index.html&lt;/a&gt;). You have to build your own wrapper class for log4net. It´s important that this class is serializable because you have to initialize this class in a FormState object like in the following code example:&lt;/p&gt;
&lt;p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;font color="#000000" size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Log4Net&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt; log4Net{&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp; get&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt; {&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt; (&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Log4Net&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;)FormState[&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;log4Net&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;];}&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp; set&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt; {FormState[&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;log4Net&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;] = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;value&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;;}&lt;br /&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;
&lt;p&gt;&lt;font color="#000000" size="2"&gt;... and in the &amp;quot;&lt;strong&gt;FormEvents_Loading&lt;/strong&gt;&amp;quot;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;FormState.Add(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;log4Net&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Log4Net&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;());&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000"&gt;The you can trace your programm&amp;nbsp;with the following&amp;nbsp;code lines:&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.log4Net.Debug(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;This is my first tracing entry&amp;nbsp;...&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000" size="2"&gt;or in case of an exception:&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.log4Net.Error(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;FormEvents_Loading failed.&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, ex);&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#000000"&gt;As a result you get a file with detailed tracing information like in the following sample...&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000" size="1"&gt;21.12.2009 17:39:33,224 [12&amp;nbsp;&amp;nbsp; ] INFO&amp;nbsp;&amp;nbsp; Form ----------------------------------&lt;br /&gt;21.12.2009 17:39:33,255 [12&amp;nbsp;&amp;nbsp; ] INFO&amp;nbsp;&amp;nbsp; Form New instance of class Log4Net created.&lt;br /&gt;21.12.2009 17:39:33,286 [12&amp;nbsp;&amp;nbsp; ] INFO&amp;nbsp;&amp;nbsp; Form &amp;gt;&amp;gt;&amp;gt;&amp;gt; FormCode.FormEvents_Loading&lt;br /&gt;21.12.2009 17:39:33,286 [12&amp;nbsp;&amp;nbsp; ] DEBUG&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp; Start FormEvents_loading ...&lt;br /&gt;21.12.2009 17:39:33,286 [12&amp;nbsp;&amp;nbsp; ] DEBUG&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp; This is my first tracing entry...&lt;br /&gt;21.12.2009 17:39:33,286 [12&amp;nbsp;&amp;nbsp; ] DEBUG&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp; Get current WebSite: &lt;/font&gt;&lt;a href="http://moss/sites/test"&gt;&lt;font color="#000000" size="1"&gt;http://moss/sites/test&lt;/font&gt;&lt;/a&gt;&lt;br /&gt;&lt;font color="#000000" size="1"&gt;21.12.2009 17:39:33,302 [12&amp;nbsp;&amp;nbsp; ] INFO&amp;nbsp;&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;&amp;gt;&amp;gt; FormCode.CheckGroupMembership&lt;br /&gt;21.12.2009 17:39:33,395 [12&amp;nbsp;&amp;nbsp; ] DEBUG&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Check if current user is Administrator: True&lt;br /&gt;21.12.2009 17:39:33,395 [12&amp;nbsp;&amp;nbsp; ] INFO&amp;nbsp;&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt; FormCode.CheckGroupMembership (93.7806 ms)&lt;br /&gt;21.12.2009 17:39:33,395 [12&amp;nbsp;&amp;nbsp; ] INFO&amp;nbsp;&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;&amp;gt;&amp;gt; FormCode.GetSPUser&lt;br /&gt;21.12.2009 17:39:33,395 [12&amp;nbsp;&amp;nbsp; ] DEBUG&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Currently logged in user login: domain\administrator&lt;br /&gt;21.12.2009 17:39:33,395 [12&amp;nbsp;&amp;nbsp; ] INFO&amp;nbsp;&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt; FormCode.GetSPUser (&amp;lt; 1 ms)&lt;br /&gt;21.12.2009 17:39:33,395 [12&amp;nbsp;&amp;nbsp; ] DEBUG&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp; Set currentFormUser (hidden field): domain\administrator&lt;br /&gt;21.12.2009 17:39:33,395 [12&amp;nbsp;&amp;nbsp; ] INFO&amp;nbsp;&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;&amp;gt;&amp;gt; FormCode.GetSPUser&lt;br /&gt;21.12.2009 17:39:33,395 [12&amp;nbsp;&amp;nbsp; ] DEBUG&amp;nbsp; Form&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Currently logged in user login: domain\administrator&lt;br /&gt;...&lt;br /&gt;and so on...&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000" size="1"&gt;&lt;font size="2"&gt;Please ask me if you need further information&lt;/font&gt;...&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000"&gt;Regards,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000" size="1"&gt;&lt;/font&gt;&lt;font color="#000000" size="1"&gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#000000" size="1"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000" size="1"&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: How do you trace exception info in browser forms with managed code?</title><link>https://www.infopathdev.com:443/forums/thread/50099.aspx</link><pubDate>Mon, 21 Dec 2009 22:19:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50099</guid><dc:creator>ACrush</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50099.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=50099</wfw:commentRss><description>&lt;p&gt;For better understanding of the question: the NullReferenceException appears in a form designed as browser-enabled and perfectly fuctional when filled in InfoPath (not in the browser). My suspicion is that I might have lost some state info during a postback...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How do you trace exception info in browser forms with managed code?</title><link>https://www.infopathdev.com:443/forums/thread/50048.aspx</link><pubDate>Fri, 18 Dec 2009 13:50:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50048</guid><dc:creator>ACrush</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50048.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=50048</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you share your experience on what you can do to get more information about Exceptions? &lt;/p&gt;
&lt;p&gt;I mean those&amp;nbsp;logged in ULS like &lt;/p&gt;
&lt;p&gt;12/18/2009 16:26:51.95 &amp;nbsp;w3wp.exe (0x1358)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0x1244&amp;nbsp;Forms Server&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Forms Services Runtime - Busine&amp;nbsp;82g6&amp;nbsp;Warning &amp;nbsp;Business logic failed due to an exception. (User: DOMAIN\UserName, Form Name: MyForm, IP: , Request: &lt;a href="http://portalserver:9999/_layouts/Postback.FormServer.aspx"&gt;http://portalserver:9999/_layouts/Postback.FormServer.aspx&lt;/a&gt;, Form ID: urn:schemas-microsoft-com:office:infopath:trySZ:-myXSD-2009-12-16T08-31-29, Type: NullReferenceException, Exception Message: Object reference not set to an instance of an object.)&amp;nbsp;b6178426-454f-4d5b-b3f3-95acc35f8dd3&lt;/p&gt;
&lt;p&gt;Is there any code snippet&amp;nbsp;you can share for logging detailed information on what was happening and what the exception source is?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;</description></item></channel></rss>