1

I recently had an issue where I would randomly get compilation errors from various pages of my app:

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: The compiler failed with error code -1073741502.

I tried all kinds of things (deleting temp files, restarting IIS, recycling app pool, taking ownership of and giving permission to temp folders) but in the end this article helped me work out it was probably a corrupted C# Compiler, since our problems were so similar.

So repairing my installation of .NET seemed to have worked. However, after a couple of days of everything working okay I have started to get the error again, and it seems my C# Compiler is corrupted again. Can anyone suggest why this would keep happening? Or what else it might be?

6
  • The link you've pasted is not returning any content. Commented Sep 23, 2015 at 15:31
  • It may be your app is doing something that affects deeply the compiler. Does your app writes new or overwrites files? Without knowing more details is not easy. More things, check if your Anti-virus or Anti-malware is not cleaning the compiler, it might me strange but it wasn't the first time. Commented Sep 23, 2015 at 15:38
  • The author of that article indicates that his 'corrupted' compiler file csc.exe had a file size of 0 bytes. Are you also seeing this symptom -- especially after you corrected and then the problem reappeared? Commented Sep 23, 2015 at 15:58
  • This post may be helpful: blogs.msdn.com/b/friis/archive/2012/09/19/… Commented Sep 23, 2015 at 16:02
  • 1
    One of switching off AV or setting the application pool identity to ApplicationPoolIdentity seems to have fixed it. Commented Sep 29, 2015 at 13:08

2 Answers 2

3

One of turning off Anti-Virus (scans folders as they are accessed and might cause access problems) or setting the Application Pool Identity to ApplicationPoolIdentity (assigns resources more intelligently than NetworkService) seems to have fixed it.

Sign up to request clarification or add additional context in comments.

Comments

0

This was a fix for me.... I had the same problem, it occured suddenly without any changes on the server. When I updated Antivirus software it didn't happen again. (Antivirus software in question is Immunet Clam AV )

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.