0
votes

In Visual Studio 2017:

  1. Edited My_Layout.cshtml then right-clicked file > Preview changes to My_Layout.cshtml - change detected
  2. Right-clicked file > Publish My_Layout.cshtml
  3. Web Publish Activity:
    Preparing to publish files...
    Using ID '8eba-fa723c2cc7fe' for connections to the remote server.
    Using ID '99ee-a03ad6ce124b' for connections to the remote server.
    Updating file (/pj/My_Layout.cshtml).
    Your file(s) have been successfully published.
  4. Checked My_Layout.cshtml file content via FTP client - file is updated
  5. Refreshed browser - website does not update

The website updates only after an app restart.

What is causing the site to not update after publishing my file and how to fix the issue?

1
In your web.config, did you check the FcnMode of httpRuntime attributeNicoD
<httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" maxRequestLength="51200" fcnMode="Disabled" /> what should the value be for fcnMode?alex
should be default or single. With disable file change notification is disabled.NicoD

1 Answers

1
votes

try set Fcmode to Default.

  • Default: For each subdirectory, the application creates an object that monitors the subdirectory. This is the default behavior.
  • Disabled: File change notification is disabled.
  • NotSet: File change notification is not set, so the application creates an object that monitors each subdirectory. This is the default behavior.
  • Single: The application creates one object to monitor the main directory and uses this object to monitor each subdirectory.