The error "Operation is not legal in the current state" when trying to start an ASP.NET project in VS2013?

I have an ASP.NET website created using WebMatrix 3. I have an option in VS2013 that has been tested to use the 64-bit version of IIS Express since I am running 64-bit Windows 8.1. When I try to start a project, I get the error message "The operation is not legal in the current state." Does anyone know how to fix this?

+7
visual-studio-2003 webmatrix
source share
3 answers

I got the same error "The operation is not legal in the current state" when I started the project in Google Chrome, stopping the project and then closing all the chrome instances, fixed the problem.

I think this is due to the fact that visual studio cannot connect to a chrome instance for debugging.

+3
source share

Closing Chrome and restarting IIS (for example, in IIS Manager) should solve the problem. It helped me in my case.

+1
source share

We had the same issue on VS (Visual Studio) 2017 today. The steps to resolve this are as follows:

  • Stop a project that is running in VS
  • Clear all IIS instances that are temporarily created by VS
  • Compile the project and run it again
0
source share

All Articles