Asked by:
Cannot open/create ASP.NET applications in Visual Studio2019

Question
-
User1284270482 posted
I'm having trouble opening my projects in Visual Studio. I get the following error and the project does not load.Creation of virtual directory failed with the following error: Filename: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.configLine number: 24Error: The configuration section 'fulltrustassemblies' cannot be read because it is missing a section declaration.I tried creating a new ASP.NET webform application with target framework 4.7.2 (same as the ones of the project that does not load) and get the same issue.Monday, December 7, 2020 12:31 PM
All replies
-
User753101303 posted
Hi,
If really written as <fulltrustassemblies> in this file, try <fullTrustAssemblies> instead (and make sure sure to change the end tag as well). In tthe machine.config file you should also have a line starting with <section name="fullTrustAssemblies" type="System.Web.Configuration.FullTrustAssembliesSection, etc...
Seems you had an unwanted changed somewhere in a machine level file (.NET config system is hierarchical ie it is "merging" multiple configuration files so that you can configure stuff from the machine level down to the application folder).
Monday, December 7, 2020 2:18 PM -
User1284270482 posted
The file has <fullTrustAssemblies>. Here is the section:
<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal"/>
<trustLevel name="High" policyFile="web_hightrust.config"/>
<trustLevel name="Medium" policyFile="web_mediumtrust.config"/>
<trustLevel name="Low" policyFile="web_lowtrust.config"/>
<trustLevel name="Minimal" policyFile="web_minimaltrust.config"/>
</securityPolicy>
<trust level="Full" originUrl=""/>
<fullTrustAssemblies>
<add assemblyName="Microsoft.VisualStudio.Enterprise.AspNetHelper" version="11.0.0.0" publicKey="002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293"/>
<add assemblyName="Microsoft.VisualStudio.Web" version="11.0.0.0" publicKey="002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293"/>
<add assemblyName="Microsoft.Web.Infrastructure" version="1.0.0.0" publicKey="0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9"/>
<add assemblyName="System.Data.SqlServerCe" version="4.0.0.0" publicKey="0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8"/>
</fullTrustAssemblies>
<partialTrustVisibleAssemblies/>
</system.web>Monday, December 7, 2020 2:21 PM -
User-939850651 posted
Hi SaranRajen,
As described by other members of the community, there is no section declaration for the fullTrustAssemblies section in the configuration file you provided.
Have you tried adding the corresponding section declaration for it?
Something like:
<configSections> <section name="fullTrustAssemblies" type="System.Web.Configuration.FullTrustAssembliesSection,etc.."> </configSections>
Best regards,
Xudong Peng
Thursday, December 17, 2020 6:58 AM