Trust Level Error when Building .NET Web Application

  • 7021547
  • 11-Sep-2008
  • 02-Mar-2018

Environment

Verastream Host Integrator

Situation

When Verastream Host Integrator (VHI) Development Kit and Microsoft Windows SharePoint Services (WSS) are installed on the same machine, your .NET web application may fail to build. Web Builder (and the build log) displays an error similar to the following:

"/<project name>/Controller.aspx(2): error ASPPARSE: The current trust level does not allow use of the 'culture' attribute"

Resolution

To resolve this issue, follow these steps to modify the web.config file properties.

  1. In a text editor, such as Notepad, open c:\inetpub\wwwroot\web.config.
  2. Scroll to the <system.web> section.
  3. Set the system.web trust level parameter to WSS_Medium. For example:
<trust level="WSS_Medium"/>
  1. Set the system.web pages property enableSessionState to true. For example:
<pages enableSessionState="true">
</pages>
  1. Under httpModules, add System.Web.SessionState.SessionStateModule. For example:
<httpModules>
<clear/>
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules>
  1. Save and exit web.config.

The following example shows all of the web.config properties set to enable Verastream web application builds.

<configuration>
<system.web>
<httpModules>
<clear/>
<add name="Session"
type="System.Web.SessionState.SessionStateModule"/>
</httpModules>
<pages enableSessionState="true">
</pages>
<trust level="WSS_Medium"/>
</system.web>
</configuration>

After completing the above steps, re-build your project in Web Builder.

Cause

When Microsoft Windows SharePoint Services 2.0 Service Pack 2 is installed (a prerequisite for Microsoft BizTalk Server 2006), it sets an insufficient trust level in the IIS web.config file.

Additional Information

Note: Beginning in VHI version 7.5, the HTML 5 Web Application project type, which is platform and technology independent, is available in Web Builder. The .NET and Java Web Application project types are still available but deprecated on the Legacy tab.

Legacy KB ID

This article was originally published as Attachmate Technical Note 10083.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.