I have been getting a very strange server error when I run my latest ASP.NET projects. Both projects have impersonate=true set in the web.config file with the username and password set as my personal username and password that I use to log on to the domain. I have set impersonation like this because I want the application to read and write files to a shared folder on another machine.
The project compiles fine but when I try to access it for the first time in IE I get the following error:
Description: An unhandled exception occurred during compilation using the CodeDomProvider 'Microsoft.VisualBasic.VBCodeProvider'. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.ExternalException: Cannot execute a program. The command being executed was "c:\winnt\microsoft.net\framework\v1.1.4322\vbc.exe" @"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\webreports\7560c61e\3a26b9a7\wwdwm0gw.cmdline".
I get this error if I run the project on my local development machine or if I run it from our web server. If I kill the aspnet worker process on the machine that is serving the application and refresh the page on the client, it compiles and runs perfectly. This happens every time I make changes to the project.
Does anyone know why this is happening and what I can do to fix it? Thanks.