Try   HackMD

.Net 6 IIS陰影複製

tags: IIS .net core .net
來源連結

陰影複製主要在於佈板時可以不受檔案綁定影響,以及使用者不會受到布板而中斷使用體驗(站台複製時還是會有等待時間),Web.Config 加入陰影複製的設定,及安裝ASP.NET Core 6.0 的 Hosting Bundle

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Web.config

主要在於加入handlerSetting的部分,有使用Log時需要將Log移出WebSite的資料夾Logs太大而增加過多複製的時間

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\MeetingManage.dll" stdoutLogEnabled="true" stdoutLogFile="..\MeetMangelogs\stdout" hostingModel="inprocess">
                <environmentVariables>
                    <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
                </environmentVariables>       
        <handlerSettings>
          <handlerSetting name="experimentalEnableShadowCopy" value="true" />
          <handlerSetting name="shadowCopyDirectory" value="../ShadowCopyDirectory/" />
          <!-- Only enable handler logging if you encounter issues-->
          <!-- <handlerSetting name="debugFile" value="../ShadowCopyLogs/aspnetcore-debug.log" /> -->
          <!-- <handlerSetting name="debugLevel" value="FILE,TRACE" /> -->
        </handlerSettings>    
      </aspNetCore>
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 70f92c01-51f1-40f5-8520-ea54cdfa6aee-->