0

I have a c# web app that was developed under vs2015 / iis express and a console app that runs on the same box. I had set up a named mutex to mitigate file access contention and all worked great.

The console app created the mutex "IPC" and the web app opened it as an existing mutex.

Once I deployed that web app and console app to the production server (2008 r2/iis) the two apps cant see each others mutexes and the whole scheme comes crashing to the ground.

Is there a way to get around this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • Could you share how you created the `Mutex` ? Does https://stackoverflow.com/questions/2830546/cross-user-c-sharp-mutex helps ? – Cyril Durand Apr 10 '20 at 13:51
  • Sure: In the Console App: Mutex mutex = new Mutex(false, "IPC"); In the "Marooned" Web App in IIS: Mutex mutex = Mutex.OpenExisting("IPC"); This all worked on the dev laptop with iis express and vs2015. I did try "Global\IPC" as is prescribed for terminal sessions but that didn't help. –  Apr 10 '20 at 15:39
  • Could you edit your questions with the additional information ? it will be easier to follow. You change the name with `Global` for both the console and IIS ? – Cyril Durand Apr 10 '20 at 16:02
  • Hey, That link to the post had the mutex declared as static. That AND "Global\IPC" Fixed it!! - Thank you ever so much! –  Apr 10 '20 at 16:36

0 Answers0