.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘Forms’

Description of the Forms Server 2007 hotfix package (Ifswfe-x-none.msp): October 27, 2009

Symptoms
This article describes the Microsoft Office Forms Server 2007 issues that are fixed in the hotfix package that is dated October 27, 2009.
Resolution
Issues that this hotfix package fixesYou try to fill a Microsoft Office InfoPath 2007 form that is enabled for display on a mobile device. If the form contains a drop-down list that is bound to a Windows SharePoint list, a NullReferenceException exception occurs.
You use Forms Server 2007 to render an HTML form that contains an Office InfoPath 2007 template. The template is contained in a section of the form. When you use Mozilla Firefox to scroll through the section, the Cannot be blank red asterisks do not scroll together withother items in the section.

BUG: “Attempt to Access the Method Failed” Error Message When You Use a Reference to the Wrong Microsoft Forms 2.0 Object Library

Symptoms
In a Visual Studio .NET project that contains a reference to the Microsoft Forms 2.0 Object Library, you may receive an error message similar to the following:

System.MethodAccessException: “Attempt to access the method failed.”
Resolution
When you use the Add Reference dialog box to add a reference to the Microsoft Forms 2.0 Object Library, you may notice that two entries appear for Microsoft Forms 2.0 Object Library.Both of these entries refer to the FM20.dll file.
You must select the first Microsoft Forms 2.0 Object Library entry in the list because this is the Primary Interop Assembly (PIA) reference. If you select the second Microsoft Forms 2.0 Object Library entry, your application may not behave as expected.

An exception does not propagate correctly to the calling function in a Windows Forms application project in Visual Studio .NET

Symptoms
When you use structured exception handling in a Microsoft Windows Forms application, the exception may not propagate correctly to the calling function. This behavior may occur if you run your Windows Forms application without using the debugger. When this behavior occurs, you may receive the following error message:

An unhandled exception has occurred in your application. If you click continue, the application will ignore this error and attempt to continue. If you click Quit the application will shut down immediately.
My Exception However, if you run your Windows Forms application with the debugger, you may not receive this error message.
Resolution
When you run your Windows Forms application without using the debugger, you use the NativeWindow.CallBack method to catch the exception and to prevent the program from unexpectedly quitting (crashing). In the NativeWindow.CallBack method, you populate the exception message by using a standard exception dialog box.
However, if you run your Windows Forms application with the debugger, you do not catch the exception because you use the NativeWindow.DebuggableCallBack method. When you use the NativeWindow.DebuggableCallBack method, the just-in-time (JIT) debugger stops the application from running.