question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[IIS express known issue] When using IISExpress with latest v7 Polly, app pool restarts cause IISExpress to crash

See original GitHub issue

Summary:

To preface, this may be something in our specific config/usage of Polly - however I wanted to file in case anyone else is encountering this weirdness. We use IISExpress locally to do development on our site. After updating from Polly v6 to v7 - whenever we re-build the solution and refresh (and IISExpress shuts down the app, and spins it back up), IISExpress will crash. The console does not say anything is wrong, but the Windows Event log has:

Application: iisexpress.exe Framework Version: v4.0.30319 Description: The process was terminated due to an internal error in the .NET Runtime at IP 00007FFDB2DCA4BF (00007FFDB2C90000) with exit code 80131506.

Faulting application name: iisexpress.exe, version: 10.0.14358.1000, time stamp: 0x574fb9e6 Faulting module name: clr.dll, version: 4.7.3362.0, time stamp: 0x5c2fcfd4 Exception code: 0xc0000005 Fault offset: 0x000000000013a4bf Faulting process id: 0x8a5c8 Faulting application start time: 0x01d4e8e42d82d2c4 Faulting application path: C:\Program Files\IIS Express\iisexpress.exe Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Report Id: 6a06573f-4e42-4a3f-88fb-71a370c3de53 Faulting package full name: Faulting package-relative application ID:

Downgrading back to v6 solves this problem for me, every time. So something changed from v6 to v7 that IISExpress (or our specific site config/build) doesn’t like.



Expected behavior:

For IISExpress to not crash with Polly v7.



Actual behaviour:

IISExpress crashes hard upon upgrade to Polly v7.



Steps / Code to reproduce the problem:

Best is a complete example or failing unit test. It is always useful to see:

  • code of any policy declarations,
  • code of calls to .Execute/AndCapture/Async(...)

We only actually use Polly in a handful of places in our codebase, here’s some examples:

_retryPolicy = Policy.Handle<Exception>().WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(i + 1), (exception, timeSpan) =>
               {
                   Logger.Warn("Retrying Query", new { exception = exception.ToString(), timeSpan = timeSpan.ToString() });
               });
var output = Policy
                .Handle<TimeoutException>()
                .Or<RedisServerException>()
                .Or<RedisException>()
                .Or<AggregateException>(
                    ae => ae.InnerExceptions.Any(ie => ie is TimeoutException || ie is RedisServerException ||
                                                       ie is RedisException));

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
reisenbergercommented, Apr 9, 2019

@nicholashead Awesome! Noted to the Microsoft teams. Thanks for your collaboration in pin-pointing!

0reactions
reisenbergercommented, Jun 25, 2019

Closing as there is nothing further to do on the Polly side on this issue. However, I’m tracking https://github.com/dotnet/standard/issues/873 and will comment again here when that resolves.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IIS Express crashes when starting a site from visual studio
One thing we can try is to start the problematic web site without using VS. You can execute IISExpress.exe with /siteid option. You...
Read more >
Windows 11 ARM - Visual studio IIS Express crash
1 project, VS always complain with Unable to launch IIS Express Web Server. Try to run "iisexpress.exe /trace:error" always said error loading ...
Read more >
Troubleshoot ASP.NET Core on Azure App Service and IIS
The most common cause for this error is that the app is published for an incompatible processor architecture. If the worker process is...
Read more >
IIS Express Terminates after Solution Build
I build and run the Web App the first time, which loads IIS Express and everything works well. I then effect changes in...
Read more >
Fix IIS website hangs and slow loads
An IIS or ASP.NET hang can cause your website to have slow page loads, timeouts, or 503 Service Unavailable errors. Hangs can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found