Microsoft Knowledge Base Email Alertz

(922125) - Describes a behavior that occurs because, by default, Visual Studio Tools for Office forms contain code. To resolve this behavior, remove the code from the form template before you publish the form template.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Only the "Administrator-approved form template (advanced)" option is available when you publish a browser-compatible form template by using Visual Studio 2005

Article ID: 922125 - View products that this article applies to.

SYMPTOMS

When you publish a browser-compatible form template by using Microsoft Visual Studio 2005, you experience the following symptoms:
  • The following information appears in the Publishing Wizard:
    An administrator must approve this form template before it can be filled out by using a browser. The template may contain form code, require full trust, be enabled to render on a mobile device, or use a data connection managed by a server administrator.
  • The Document Library option and the Site Content Type (advanced) option are unavailable in the Publishing Wizard. These options appear dimmed. In this situation, only the Administrator-approved form template (advanced) option is available.
You experience these symptoms even if you do not include any code in the form template.

CAUSE

This behavior occurs because a Microsoft Visual Studio 2005 Tools for the Microsoft Office System form contains managed code by default. This is because users generally include code in a Visual Studio 2005 Tools for the Office System form.

Note If a form template contains managed code, the Publishing Wizard lets you click only the Administrator-approved form template (advanced) option.

RESOLUTION

To resolve this behavior, remove the code from the form template before you publish the form template. To do this, follow these steps:
  1. Open the Microsoft Office InfoPath 2007 form template by using Visual Studio 2005.
  2. On the Tools menu, click Form Options.
  3. In the Form Options dialog box, click Programming.
  4. Click Remove Code, and then click Yes in the following message:
    This will delete all script files and Visual Basic and C# assemblies associated with this form template.

    Do you want to continue?
  5. Click OK, and then publish the form template to the Microsoft Office Forms Server 2007 Web site.

STATUS

This behavior is by design.

Properties

Article ID: 922125 - Last Review: November 3, 2006 - Revision: 1.2
APPLIES TO
  • Microsoft Office Forms Server 2007
Keywords: 
kbexpertisebeginner kbdeployment kbtshoot kbprb KB922125
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Massimo Report As Irrelevant  
Written: 1/18/2010 7:22 AM
It doesn't work for me. I have the Remove Code button in grey and I can't click it. I published the form in the past without problems, but now InfoPath can't publish the form without Admin approval. Could you help me?

Matt - mailmjm@gmail.com Report As Irrelevant  
Written: 2/28/2010 6:48 PM
Figured it out! I didn't have any code nor did any of the other resolutions work for me, but I did have "Enable rendering on a mobile device" checked under the "Mobile device" heading Tools-->Form Options (Browser). Hope that works for you!

Pissed User Report As Irrelevant  
Written: 3/2/2010 3:09 PM
This answer is shit. What if I want the code how does that solve my problem