Search
Web Braintrove
Site Navigation
Home
Products
Tags
Levels
Dates
Authors
5 MOST RECENT
Locate the Design Checker Task Pane in InfoPath 2010
Locate Conditional Formatting and Custom Validation in InfoPath 2010
Conditionally Display Different Values In a Single Expression Box
Create a Button With a Blank Label
Create Shared Rules
5 MOST POPULAR
Access a Method in a Master Page with Code-Behind
Pass Query String Parameters to an ASP.NET Xml Control
Prevent Namespace Prefixes from Being Copied to the Output
Create Groups in a Drop-Down List Box
Configure IIS 7 for Custom Error Pages
5 MOST FORGOTTEN
Install Windows 7 Beta onto a Virtual Machine
Group Dates by Year, Month and Day
Configure Lab Color Mode Defaults for Braintrove Articles
Create a Monochromatic Dream Text Effect Using Styles
Combine Multiple Sums Into a Single Function
Microsoft MVP
Popular
This article has been viewed 1115 times.

Get InfoPath to Preview VSTO and VSTA Projects

Page 1 of 7
Written by Gregory Scot Collins
Friday, 29 February 2008, 5:08 AM
This article has been tested to work with the following products and versions. No guarantee of compatibility, with or without modification, is offered for products or versions other than those listed.

The issue

While attempting to preview a Visual Studio Tools for Office (VSTO) or Visual Studio Tools for Applications (VSTA) InfoPath project you might get a rather unhelpful error message telling you that "InfoPath cannot open the selected form," as shown in Screenshot 1. If this can occurs for a brand new, freshly created managed code project, but does not occur with a codeless or script-based form, then you need to read on.
The lack of preview capabilities while building an InfoPath form template can be extremely aggravating. Preview is essential to the development workflow allowing you to quickly test changes and progress.
There are various reasons you could receive this error message. You will see it if you attempt to preview a form that is already being previewed. I have, on occasion, received this message for a form template that was previewing just fine moments before, and then stopped after some changes I made—an issue for which I still have not found a reason. However, this article is not about those scenarios, but rather the scenario where you can never preview a managed code project, even a brand new, freshly created, blank one.

Domains and security zones

The error stems from security issues due to being part of a workgroup rather than being joined to a domain. Any machine joined to a domain will not experience this issue because it has a detectable intranet while machines that are part of a workgroup don't, and therefore can experience the issue.
InfoPath uses the Windows Internet (WinINet) application programming interface (API) to define many of its security settings and subsequently depends heavily on Internet Explorer settings. When not joined to a domain, an intranet is not detected and the InfoPath form is opened in the more restrictive Internet zone rather than the Intranet zone. Because it is considered a more controlled environment, security settings for the Intranet zone are less restrictive. Forms with managed code (i.e. VSTO and VSTA projects) are, by default, not allowed to open in the Internet zone, effectively disabling your ability to preview your form template.
Bookmark this Article
StumbleUpon  Stumble It!
Digg  Digg It!
del.icio.us  del.icio.us
List of Figures
Screenshot 1 - An error dialog while trying to preview a VSTO or VSTA InfoPath project.
Screenshot 2 - Disabling automatic intranet detection in Internet Explorer.
Screenshot 3 - A site that has been manually added to the Local Intranet zone.
Screenshot 4 - Establishing a domain impersonation for previewing a form template.
Listing 1 - The zone attribute flag enumeration.
Article Tags
Great Deals
TigerDirect Exclusive Deals, Limited Time Offers, Act Now And Save!
Find all current special offers on Adobe products.
Try SugarSync Free!
Join WebHost4Life.com
TigerDirect
Computers4SURE (4SURE.com - An Office Depot Co.)
Copyright © 2006-2010 Braintrove. All rights reserved. Braintrove, braintrove.com, and the Braintrove logo are trademarks of Gregory Scot Collins in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. Any rights not expressly granted herein are reserved.