Get InfoPath to Preview VSTO and VSTA Projects
Page 7 of 7
Written by
Gregory Scot Collins
Friday, 29 February 2008, 5:08 AM
The local intranet flags
The registry key is: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1 {Flags}. Zone 1 is the Local Intranet zone. Preview worked when the value was set to 0xdb, but stopped working when set to 0x143, which was the default value after building out my machine with the operating system and required applications. It also didn't work after the Internet Explorer cumulative patch was installed, resulting in a value of 0x1db. Manually changing this value, I didn't see any changes to any of the settings in the Internet Explorer Local Intranet settings, though I later found I wasn't looking in the right place.
With help from the fine members of the Microsoft private MVP newsgroup for Internet Explorer, I was directed to the MSDN Internet Explorer Developer Center article: ZAFLAGS Enumerated Type, wherein we find the enumeration for the Flags values as shown in Listing 1:
Of specific interest is 0x100, ZAFLAGS_DETECT_INTRANET, which is new to Internet Explorer 7 for Windows and controls the automatic detection of an intranet network. The documentation states that if the machine is joined to a domain or if the Network Location Awareness API indicates that the machine is on a managed network the flag is 1, otherwise it is 0. Specifically, this flag controls, or is controlled by, the Automatically Detect Intranet Network check box on the Local Intranet dialog (refer to Solution 2: The per-user solution). I did not see the change because I wasn't looking at this dialog box, but was looking at all the radio button settings on the Security Settings - Local Intranet Zone dialog box which is reached by clicking on the Custom Level button on the Security tab of the Internet Options dialog box.
Intranet and Internet zones
InfoPath uses this setting to determine whether the form opens in the Intranet or the more restrictive Internet zone, the specifics of which were already discussed in the opening paragraphs of this article. As the Microsoft InfoPath tester put it: "As for you being the only one ever to hit this, I think that's likely a reflection of the fact that most people who design InfoPath form templates will use it on a machine that has a detectable intranet, so the forms will open successfully with the default settings."
As to whether this is by design or an open issue, I was told that this was definitely by design, though to me it seems like an open issue. A private newsgroup member agrees with me, having stated: "IE7 sets Automatically Detect Intranet by default when installed which is a stupid value outside of domains as it works *only* in domains."
Conclusion
Boy this has been a thorn in my side! I am grateful to finally put this issue to rest and to have an easy UI solution to resolve this issue without needing to directly modify the registry. I wish to thank all the kind and generous others who provided me with more detailed information as to what these flags are and do. It is my hope that the endless hours I've spent trying to discover the root cause and a solution will help anyone else who might run across this issue to quickly resolve it without the endless headache, interrupted work hours, and more than a year of pain it caused me!
No longer will I fear Windows Update. With this fix and System Restore on my side, I was able to completely update all of my machines with confidence!
Copyright ©2008
Braintrove. All rights reserved. This material may not be copied, published, broadcast, rewritten
or redistributed. You may, however, use the techniques, along with any associated code and files in
your development. This material is provided "AS IS" without warranty of any kind. You accept full
responsibility and liability for any and all results associated with use of this material.

Stumble It!
Digg It!
del.icio.us




