0

I have a rather old ASP.NET application targeting .NET Framework 4.5.2. The application worked fine on my development machine while I was using Visual Studio 2013. After switching to VS 2015 with Update 3, I started getting the following exception:

[InvalidOperationException: Post cache substitution is not compatible with modules in the IIS integrated pipeline that modify the response buffers. Either a native module in the pipeline has modified an HTTP_DATA_CHUNK structure associated with a managed post cache substitution callback, or a managed filter has modified the response.] System.Web.HttpWriter.GetIntegratedSnapshot(Boolean& hasSubstBlocks, IIS7WorkerRequest wr) +5025795 System.Web.HttpResponse.GetSnapshot() +150 System.Web.Caching.OutputCacheModule.OnLeave(Object source, EventArgs eventArgs) +1091 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92

stuartd
  • 70,509
  • 14
  • 132
  • 163
ebhh2001
  • 2,034
  • 4
  • 18
  • 27
  • https://support.microsoft.com/en-us/help/2014472/asp.net-response-filtering-and-post-cache-substitution-are-not-compatible and http://stackoverflow.com/questions/17574702/post-cache-substitution-error-running-locally – stuartd Feb 06 '17 at 17:18
  • @stuartd - I am running IIS Express 10, which came with VS 2015. – ebhh2001 Feb 06 '17 at 17:23

2 Answers2

1

Try to disable the Browser Link.

From Visual Studio, in the Browser Link dropdown menu, uncheck Enable Browser Link.

You can also do it in the Web.config file by simply adding

<add key="vs:EnableBrowserLink" value="false" />

Harold Javier
  • 887
  • 2
  • 7
  • 16
0

The solution was actually quite simple based on this post. BrowserLink is on by default in VS 2015. After turning BrowserLink off using a menu in the VS UI, the problem went away.

ebhh2001
  • 2,034
  • 4
  • 18
  • 27