Publishing ASP.NET 3.5 Web.config Site Sheet Empty due to providerOptions

I am trying to publish an ASP.Net 3.5 site on IIS 7.5 using WebDAV, and every time I create a configuration file, it is empty. The culprit is the Elements provider described in the code below.

<system.codedom>
<compilers>
  <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <providerOption name="CompilerVersion" value="v3.5"/>
    <providerOption name="WarnAsError" value="false"/>
  </compiler>
  <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <providerOption name="CompilerVersion" value="v3.5"/>
    <providerOption name="OptionInfer" value="true"/>
    <providerOption name="WarnAsError" value="false"/>
  </compiler>
</compilers>

The FX_schema.xml file in C: \ Windows \ System32 \ inetsrv \ config \ schema is used to check Web.config for the site and does not contain ProviderOptions as part of XML. I could add something to allow this, to modify the file, to add it by adding something like this:

 <collection addElement = "providerOption">
  <attribute name = "name" required = "true" isUniqueKey = "true" type = "string" />
  <attribute name = "value" required = "true" type = "string" />
 </collection>

. , , . , , " codedom", , 3.5 , LINQ, , .

, - IIS 7.5 -?

0
1

, , , , , : . ThreeFive.xml C:\Windows\System32\inetsrv\config\schema. :

<configSchema>
    <sectionSchema name="system.codedom">
        <element name="compilers">
            <collection addElement="compiler" removeElement="remove" clearElement="clear">
                <attribute name="language" type="string" isCombinedKey="true" />
                <attribute name="extension" type="string" isCombinedKey="true" />
                <attribute name="type" type="string" />
                <attribute name="warningLevel" type="int" />
                <attribute name="compilerOptions" type="string" />
                <collection addElement="providerOption">
                  <attribute name="name" required="true" isUniqueKey="true" type="string" />
                  <attribute name="value" required="true" type="string" />
                </collection>
            </collection>
        </element>
    </sectionSchema>
</configSchema>

3.5, appconfig, LINQ, , 3.5 . , LINQ , , .

0

Source: https://habr.com/ru/post/1773048/


All Articles