Crazy Internal Server Error When Developing With WCF and AJAX with jQuery

I've been doing some development lately involving calling WCF services from client-side script using jQuery's ajax function, and ran into some strange behavior.

I had some code written that would run successfully without error, but then added some additional, un-related code, which would also attempt to call a WCF service via jQuery and AJAX. The original, working code remained untouched. The new code would be unsuccessful -- however, the old, previously working code would now also fail. The error was Error 500, Internal Server Error. Stopping and restarting the development server didn't solve the issue, nor did exiting and restarting Visual Studio. Even rebooting my machine didn't help. It just didn't make any sense.

I finally resolved the problem by deleting the Temporary ASP.NET files for the site. By default, these are located in C:\WINDOWS\Microsoft.NET\Framework\(Framework Version)\Temporary ASP.NET Files, in a sub-folder matching the name of your site. Note that if you're using version 3 or 3.5 of the framework, the temporary files will appear under version v2.0.50727 because 3 and 3.5 are supersets of 2.0. Also note that you will need to shut down Visual Studio before you attempt to delete these files if you currently have the site open in it because it will lock these files.

I also wonder if doing a rebuild of the solution would accomplish the same thing, although I doubt it.

UPDATE
Nope, rebuilding the solution doesn't solve the problem. You need to delete the temporary files.

Comments

Popular Posts

Resolving the "n timer(s) still in the queue" Error In Angular Unit Tests

Silent Renew and the "login_required" Error When Using oidc-client

How to Get Norton Security Suite Firewall to Allow Remote Desktop Connections in Windows

Fixing the "Please add a @Pipe/@Directive/@Component annotation" Error In An Angular App After Upgrading to webpack 4

How to Determine if a Column Exists in a DataReader