2016-08-04 5 views
0

In meinem web.Release.config I definiert drei Transformationen:Web.config Transformation gilt teilweise

<?xml version="1.0"?> 
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> 
    <system.web> 
    <compilation xdt:Transform="RemoveAttributes(debug)" /> 
    </system.web> 
    <system.webServer> 
    <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" xdt:Transform="SetAttributes" xdt:Locator="Match(directory)"> 
     <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" xdt:Transform="SetAttributes" xdt:Locator="Match(dll)" /> 
    </httpCompression> 
    </system.webServer> 
</configuration> 

Sowohl die Vorschau Transformation angewendet/Publishing zeigt, dass nur die Kompilierung-Tag umgewandelt wird.

Kann nicht verstehen, warum httpCompression/Schema Tags unverändert bleiben?

Hier ist ein Auszug aus dem ursprünglichen web.config Inhalt:

<httpCompression directory="%TEMP%\iisexpress\IIS Temporary Compressed Files"> 
    <scheme name="gzip" dll="%IIS_BIN%\gzip.dll" /> 
    <staticTypes> 
    <add mimeType="text/*" enabled="true" /> 
    <add mimeType="message/*" enabled="true" /> 
    <add mimeType="image/svg+xml" enabled="true" /> 
    <add mimeType="application/javascript" enabled="true" /> 
    <add mimeType="text/javascript" enabled="true" /> 
    <add mimeType="application/javascript; charset=utf-8" enabled="true" /> 
    <add mimeType="application/atom+xml" enabled="true" /> 
    <add mimeType="application/xaml+xml" enabled="true" /> 
    <add mimeType="*/*" enabled="false" /> 
    </staticTypes> 
</httpCompression> 

Antwort

1

@lexeme Code ist falsch. Bitte versuchen Sie diesen Code unter:

<system.webServer> 
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" xdt:Transform="SetAttributes"> 
    <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" /> 
</httpCompression> 

+0

Das ist wahr. Gott segne dich;) – lexeme

Verwandte Themen