Thursday, November 13, 2008

Operation could destabilize the runtime.

Problem:
I had an ASP.NET web application that worked fine in development, but on the test server threw the error:

Operation could destabilize the runtime.

Solution:

After attempting a myriad of solutions that other people used to resolve their problems, I decided to look a little deeper into my code and found the following:

if (credentials == null)
{
if (!IsDomainUser)
{
// throw access error
throw new System.Security.VerificationException();

Basically, I was throwing this error myself. The vagueness of the error didn't help, but in my own defense, I was trying to share libraries between a web application and a desktop application, and well... code that should ownly be called on a desktop or server application won't always fun so well in a web application.

No comments: