"The resource cannot be found" when opening a page in IIS hosted asp.net web application
A couple things to try
- Make sure there is not a duplicate site in IIS that is capturing the request
- Restarting IIS is never a bad option
- Make the web.config itself is set to target framework 4.0 and not 2.0
Usually when this happens where it works fine locally but not when deployed it always turns out to be the third item, a web.config configuration mis-match. Hope this helps!
I had this problem.
another solution can be changing the Application Pool settings:
go to the application pool related to your application. Click advanced settings. Change the "Enable 32-Bit Application"