None of the other answers worked for me. I fixed my error by changing the web project's output path. I had had it set to bin\debug but the web project doesn't work unless the output path is set to simply "bin"
I've had this a couple of times. It's especially frustrating as it's right off the bat, and the error message holds no clue as to what might be the issue.
To fix this, right click your project title, in this case "TestMvcApplication" and click build.
This forces the code to compile before you run it. Don't ask me why, but this has been the solution 100% of the time for me.
I have found that when you are forced to use the Configuration Manager to run under x86 or anything other than the standard project "out of the box" settings, the IDE creates a bunch of sub directories under the bin folder for the web project.
Once this starts happening, if the Cassini server is running, then the project does not serve properly.
I fixed it by going into the Web Project properties -> Build settings and changing the Output Path to be bin\
Then rebuild and all works as it should.
I tried all above solutions but no luck. Adding line <add assembly="*" />
to web.config fixed it for me. (You can also add to machine.config or root web.config file of the appropriate .NET framework version, I didn't try it) Thanks to MS Support for solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With