Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New doc content for ShadowCopying #25499

Closed
HaoK opened this issue Apr 2, 2022 · 3 comments · Fixed by #25547
Closed

New doc content for ShadowCopying #25499

HaoK opened this issue Apr 2, 2022 · 3 comments · Fixed by #25547
Assignees
Projects

Comments

@HaoK
Copy link
Member

HaoK commented Apr 2, 2022

Part of dotnet/aspnetcore#40961 to make ShadowCopy non experimental we should document this feature

New section content:

ShadowCopying

In .NET 6 we added experimental support for shadow copying app assemblies to the ASP.NET Core Module (ANCM) for IIS. When an ASP.NET Core app is running on Windows, the binaries are locked so that they cannot be modified or replaced. You can stop the app by deploying an app offline file, but sometimes doing so is inconvenient or impossible. Shadow copying enables the app assemblies to be updated while the app is running by making a copy of the assemblies.

Starting in .NET 7 preview4 shadow copying is no longer experimental and will be fully supported. The feature is not intended to enable zero-downtime deployment, so its expected that IIS will still recycle the app, and some requests may get 503. We recommend using a pattern like blue-green deployments for zero-downtime deployments. Features like shadow copy help, but don't guarantee that you can do a zero-downtime deployment.

You can enable shadow copying by customizing the ANCM handler settings in web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <remove name="aspNetCore"/>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified"/>
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".logsstdout">
      <handlerSettings>
        <handlerSetting name="enableShadowCopy" value="true" />
        <!-- Ensure that the IIS ApplicationPool identity has permission to this directory -->
        <handlerSetting name="shadowCopyDirectory" value="../ShadowCopyDirectory/" />
      </handlerSettings>
    </aspNetCore>
  </system.webServer>
</configuration>

EDIT by @Rick-Anderson
Update:


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@Rick-Anderson
Copy link
Contributor

Location: As a section under IIS -> Advanced (Or does this deserve its own Shadow Copying page?)

An H2 should have plenty of SEO juice

ShadowCopying

@HaoK
Copy link
Member Author

HaoK commented Apr 6, 2022

@Rick-Anderson is this enough for you to add the section with the content in the issue, or do you prefer if I open a PR and make the changes myself (I'm sure my words will require some editing and all that too)

@Rick-Anderson
Copy link
Contributor

@Rick-Anderson is this enough for you to add the section with the content in the issue, or do you prefer if I open a PR and make the changes myself (I'm sure my words will require some editing and all that too)

I'll PR it and you can suggest changes.

@Rick-Anderson Rick-Anderson assigned Rick-Anderson and unassigned HaoK Apr 7, 2022
@Rick-Anderson Rick-Anderson added this to To do in April 2022 via automation Apr 7, 2022
April 2022 automation moved this from To do to Done Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants