My website was working fine, but after making a lot of changes, it suddenly gives a parser error and I have been unable to determine why.
I guess that "making a lot of changes" includes updating your project to use the Roslyn complier which is probably causing your issue.
Similar issues have been reported as follows:
- IIS 7 Error: Cannot execute a program. The command being executed was csc.exe
- Cannot execute a program. The command being executed was \roslyn\csc.exe
Check the followings to see if your project uses the Roslyn complier:
(1) NuGet package Microsoft.CodeDom.Providers.DotNetCompilerPlatform is installed.
(2) There is the roslyn folder under the bin folder which include the Roslin compliers csc.exe and vbc.exe.
(3) Your wab.config file includes <system.codedom>
element which specifies compiler configuration settings.
If the Roslyn complier is causing your issue the solution might be either:
(a) Remove NuGet package Microsoft.CodeDom.Providers.DotNetCompilerPlatform, or
(b) Give the worker process of IIS the right to execute the vbc.exe, or (Note that all the files of Web Site project or the .aspx files of Web Application project are compiled at the server side)
(c) Pre-compile all the files into single assembly in the Visual Studio before deployment. See Precompiling Your Website.