Thursday, May 13, 2010

ResourceWatch Error: The Service cannot be activated due to an exception during compilation

A client called after their ResourceWatch installation started to fail with this error:

Exception: System.ServiceModel.ServiceActivationException: The service '/ResourceDataService.svc' cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly 'App_Web_aza-n8ud, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies......

How odd----it's been running without issue for months.

There were two possible reasons for the failure:
  1. The virtual directory was renamed, or
  2. .Net Framework 3.5 was not installed

"Virtual Directory Renamed" When Sumatra The “Publish Web Site” deployment model in Microsoft’s Visual Studio hinges on the name of the web application mapping directly to the virtual directory name. Renaming the virtual directory without changing the ".compiled" directive causes the application to crash. If you don't have to rename the directory, don't. If you do, and it crashes, read Tom Fuller's post where he solves his 'Issue deploying WCF service to IIS 6 in non-updateable mode.'

".Net Framework 3.5" The other reason this fails is because .Net Framework 3.5 is not installed. (This is easily checked, and if you didn't rename the virtual directory, this is likely the problem.)

In this case, the app was moved to a different box, the virtual directories remained the same, BUT, .Net framework was not installed.

No comments: